Amazon Interview Question

level order print a given tree

Interview Answers

Anonymous

Apr 11, 2012

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

Anonymous

May 8, 2012

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