Can we uniquely identify a tree using level order only

can we uniquely identify a tree using level order

Hello @sharad1103

If you talking about the way input is given in the attached “Tree Bottom View” question, then YES we can create the level order tree.
In this kind of format we are given all the nodes, if the node is Not present then a -1 is given.
Example:

1 2 -1 3 4 -1 -1 5 6 -1 -1 -1 -1 is a tree like this

           1
         /
       2 
      /  \
     3    4
         /  \
        5    6

Here is the code for Level tree order input.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.