Range xor problem

why we have to do L-1 and R-1?

hello @Rakshitgarg99
given l and r given for 1 based indexing (ex -> 1st element is at index 1).
but we r using 0 based indexxing and that is why we are subtracting -1 from both L and R

ok thanks please look in this problem too Digital Dictionary

SOME OTHER TA is taking that doubt

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.