Inorder tree traversal with parent pointers