Recursive solution to Level-order