Expected output not matched

Tags: #<Tag:0x00007f181ef3f768>


The expected output of this problem is inorder traversal but my output comes up as post and preorder traversal.

Function only returns the treenode, to match the expected output we need to modify the main method.

But many people solved it successfully. Need help what I am doing wrong here.


Same issue. Any suggestions?


same issue…i think the test case is wrong.