Https://ide.codingblocks.com/s/655675

what is wrong in this code?

@hittasehgal see in the example test case when you are updating your global max for node 2 but node 3 is also on the same level but u r missing that as it updates the maxLevel at node 2 only so you are missing that.

@hittasehgal,
if u r having implementation difficulties u may refer to : https://ide.codingblocks.com/s/655960
ive commented the code

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.