Amazon Interview Question

Tree and graph concept in data structures