WALKBT : need Help

can someone help me in my solution https://www.codechef.com/viewsolution/15009757

Your code fails on the case when the initial query is ‘?’.It outputs 0 while the actual output should be 1 as root is visited initially.

2 Likes

thanks it worked :slight_smile: