LinkedIn Interview Question

Print a tree on the screen line by line.

Interview Answer

Anonymous

May 31, 2013

I knew the answer - use breadth first search and a queue. But I could not come up with the code in the 10 or 15 mins since I had not done BFS in over 10 yrs. Shows how rusty I have become - time to hit the books.