Amazon Interview Question

BFS traversal of a tree