How to appraoach this problem of daily code byte?
Since this is a update range query question, You have to implement it using a segment tree
U basically have to initialise all the node to -1 initially for those node that are getting udpated upate them to either 0 or 1
and then using segment tree query method extract the value of integer being formed.
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.