Given an array A of n elements and queries of type (l r k),find the occurrences of k in the range l to r↵
↵
If there are no updates, we can solve the problem by having a map<int,vector> and doing a binary search.↵
↵
But what if there are updates involved.↵
↵
I read somewhere that we can use bit..↵
↵
But I am not sure how that would be useful ↵
↵
Thank you in advance
↵
If there are no updates, we can solve the problem by having a map<int,vector> and doing a binary search.↵
↵
But what if there are updates involved.↵
↵
I read somewhere that we can use bit..↵
↵
But I am not sure how that would be useful ↵
↵
Thank you in advance