https://hack.codingblocks.com/contests/c/537/141
Not able to understand the problem
Find sum at levl K
hey Simran, see the sample input
1 2
2 2
3 0
4 0
5 2
6 0
7 0
2
here “1 2” means 1 is root and it has 2 children, if there are 2 children then you have to call on both left and right.
“4 0” means it has no child so it is a leaf node you only have to return root.
The following tree will be like
1
2 5
3 4 6 7
so sum at 2nd level is 3+4+6+7= 20