The video is bit confusing just because of the example or the way he has used, could you make it more clear to me ?
Query bits Hint
@msid78641 here is a quick summary:
you maintain segment tree which stores the answer(integer with corresponding binary bits from st to en), also to tackle range updates you have lazy tree which tells whether subtree needs to be updated or not!
while querying you have to take care of right shifts and then combine results.
To calculate large powers use fast exponentiation.
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.