I am facing an error in solving the Question from SecondThread's gym on Tree basics. Since, I cannot view the testcases where my code is failing, I need some help. I also cannot see other's solution because you need >1900 rating. Can someone share their solution in C++ or point out the mistake in my code? I promise that the code is quite readable.
Code




