https://ide.codingblocks.com/s/62751
is there a problem in the code of building the tree?
i am getting wrong answer.
Trees -- Find sum at level K doubt
Hey Vishesh, your code is correct, just you are starting the levels from 1,2,3 and so on…
but you have to start the levels from 0,1,2,3
so in function base case when k==1 will change to k==0
1 Like