Yahoo

  www.yahoo.com
  www.yahoo.com

Interview Question

Technical Yahoo Interview(Student Candidate) Sunnyvale, CA

Print nodes visited in the level order traversal. Nodes of

  each level should be on a single line.
Answer

Interview Answer

2 Answers

0

I answered the case where we can add the depth variable to the class Node.

The other case was to keep track of the number of elements in the next level.

Interview Candidate on Jan 11, 2011
0

Why not a simple BFS

Suraj Chandran on Feb 19, 2011

Add Answers or Comments

To comment on this Question, Sign In with Facebook or Sign Up