Yahoo

  www.yahoo.com
Work in HR? Unlock Free Profile

Yahoo Technical Yahoo Interview Question (student candidate)

I interviewed in Sunnyvale, CA and was asked:
"Print nodes visited in the level order traversal. Nodes of each level should be on a single line."
Add Tags [?]
Answer

Part of a Technical Yahoo Interview Review - one of 531 Yahoo Interview Reviews

Answers & Comments

0
of 0
votes

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
of 0
votes

Why not a simple BFS

- Suraj Chandran on Feb 19, 2011

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

Tags are like keywords that help categorize interview questions that have something in common.