Add O(1) space inorder traversal solution.