Help me to resolve run error


this is my code

Hey @singh.pankhil40
You are getting TLE actually .
Here is the logic to solve this problem :
We can solve this problem using a trie data structure. At each node of the trie, we will store the ith bit of the number for a query of type 0. To solve the query of type 1 we will store the indexes of the number that pass through that node. When we go down the tree during a query and maximizing the xor, we go in a direction that contains at least one index in range L to R, otherwise we ,go in the other direction. To search if at least one index is within the stored indexes we will use binary search.

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.