Whatsa wrong with this
@talhashamim001 there are 2 error in your code
- you are passing l r and x in max xor fucntion in wrong order you are passing as (l-1,r-1,val) but you need to pass as (val,l-1,r-1)
- you are required to print the number y no the max_xor of two numbers so you print
(max_xor^val) that would be okay
Coding Blocks IDE
this is the corrected code see it and if issue still exist let me know and if clear please rate my experience
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.