Amazon interview question

Tree and graph concept in data structures