Getting 4 test case wrong
@Jun18APP0112
hello Gurdeep,
there can u more than one node with same h value so u need to check their level as well.
and store only that value whose level is less.
pls refer this->
i am trying to implement the same logic with recursion it is getting two test cases correct
please help with my code.
pls share ur updated code

for this tree ur code is giving -> 7 1 3 6 as top view which is wrong.
reason -> u should consider level of node as well to perform any update on map
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.