Amazon interview question

level order print a given tree

Interview Answers

Anonymous

11 Apr 2012

At first I use 2 queue, and the interviewer ask me to refine to using only one queue.

Anonymous

8 May 2012

Take a look at any common Breadth First Search algorithm for handling tree printing.