Range xor problem


code passed only 1 test case

Hey @jha.aparna17

       else if(type==1)
       {
           cin>>l>>r>>x;
           int i=l-1;//because l & r are 1 indexed and both inclusive
           while(i!=r)
           {
               int curr_xor=x^v[i];
               max_xor=max(max_xor,curr_xor);
               i++;
           }
           cout<<(max_xor^x)<<endl;
       }

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.