TreeNode data structure with pre in post order morris traversal