hey , i am not able to figure out my mistake in the code. I checked the solution but it is in java and my code is in c++. Plaese help me out.
here is the link to my code:
All test cases not being passed in Range Xor problem
The conditions in binary search functions are written opposite.
Also dont use βandβ , use β&&β.
hey, I did the required changes but still all the test cases are not being passed. Is my way of taking inputs correct?
apart from the above changes, inside maxvalue function, you are doing binary search for βtempβ which is the current node, but here you are already at the current node and need to go to next node, for that you should do binary search for temp->left or temp->right depending upon the situations.
I hope you got it, do these changes, rest all things are correct