Tree top view Java

I am getting a run-time error for 1 test case
Kindly let me know where I am mistaken.

Hi @justformyntra8

You need to take input in the form of integers. Your code is giving Numberformat exception.

but the size of the input string is not mentioned, so how are we supposed to take the input as integers?

Hi Aman

I just checked. For some reason, the stub is not provided is not provided in this question. It will added to the editor soon and then you wont have to take the input and just write the function.

Alright- kindly let me know when that happens

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.