can someone help me in my solution Solution: 15009757 | CodeChef
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