this is the code
the output always remain zero
can you please help me correct the code?
Output always remain 0
Hello @prerna_gupta31 could you please explain your logic here so that i can help you in the better manner.
Firstly, I am building the tree recursively if n=2 then it will have both left child and right child. After that the function sumatk function is to compute the sum at kth level. And variable sum is defined globally
I found the mistake… thank you