The solution explained in the editorial I did not understand it is saying something about the patter from L to R. the value changes between 0 and 1 or stays 1.
I did not get a solution for this question please explain to me
The solution explained in the editorial I did not understand it is saying something about the patter from L to R. the value changes between 0 and 1 or stays 1.
I did not get a solution for this question please explain to me
@neelmani98
int mx = 0;
for(int i=l;i<=r;i++){
for(int j=i+1;j<=r;j++){
mx = max(mx,i^j);
}
}
cout<<mx;
If your doubt is resolved please mark it as closed
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.