Loading...
Is this your company?
Perform level-order traversal of an incomplete binary tree, i.e. certain nodes at a level could be empty.
Anonymous
BFS
I am thinking DFS is better, because you know the level otherwise for BFS how do you find if the NULL is the end of your level or just a NULL node?
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalized job recommendations and updates by starting your searches.