Fix the wrong Answer issue for test case when there is only one element in the list


#1

When there is only one element in the list, the inorder, preorder and postorder will be the same.
It’s giving below error
My Program Output :
Returned tree’s PreOrder traversal : [ 1 ]
Returned tree’s PostOrder traversal : [ 1 ]

Expected Output :
Inorder Traversal : 1


#2

No one ever should solve this problem anymore :stuck_out_tongue:


#3

It’s fixed. I sent the same solution as N days ago and now it passed. Only issue is I lost a few hundred points because of their mistake.


#4

This problem is still there.


#5

Different decade, same error