Implemented recursive inorder traversal