Print various tree traversals of a Binary Tree

O(N) solution. Parse each node once.