arshad2117's blog

By arshad2117, history, 21 month(s) ago, In English,

Given an array A of n elements and queries of type (l r k),find the number of 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

Read more »

  • Vote: I like it  
  • +9
  • Vote: I do not like it