Find sum at level k trees

can you plz explain how are the inputs taken in this question. i didnt understand the sample input

Hi dhruv
Please refer this

couldn’t understand…plz elaborate

Hey it is like
Level 0: 1
Level 1: 2 5
Level 2: 3 4 6 7
You can think of it as 1 has 2 children
Then 2 has 2 children (with 1 as root)
Then follow children of 2 which are leaf nodes
Then comes second child of 1 i.e 5 which has 2 children
Finally we have 2 children of 5 that are 6 and 7 which are leaf nodes
At last level is given and that is 2 so sum at level 2 is 20…

Please tell me specifically what you did not get in this?

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.