This is an interesting puzzle I recently completed. I came up with a few different ways to solve the third element of the puzzle, solution 4 (using a stack) being the best.
-
In your language of choice, represent nodes in a Binary tree
-
Print out the contents of a binary tree
-
Print out the contents of a binary tree, each depth at a time