Today's problem is a bit of a tough one depending on your programming background. The goal is to take in a binary tree and print out the nodes in level order (your choice on left to right or right to left). For instance the answer for
![]()
would be F, B, G, A, D, I, C, E, H (using left to right ordering).
Comments:
PyBanana - 11 years, 1 month ago
Python 2.7. I think this works.
reply permalink
Max Burstein - 11 years, 1 month ago
Your printTreeLevels does seem like it will work. Good job!
reply permalink
Anonymous - 11 years, 1 month ago
I'm a day late... but i liked the task.. and well the solution is pretty small in haskell:
reply permalink
David - 11 years, 1 month ago
The functional bits:
reply permalink