nagato_uzumaki's blog

By nagato_uzumaki, history, 4 years ago, In English

Given an array of length n (n<= 5*10^5) and a number k (k<=10^3), We need to count number of pairs in array whose bitwise and is greater than k. Please share your approach, as I am not able to think the effiecient solution.

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

| Write comment?
»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Isn't this the classic trie data structure problem?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I appreciate at least you tried to share some knowledge on this topic but suppose you asked a problem and someone replied that isn't it a classical FFT problem, same sounds to me but I will be glad if u can share the link if this is a classical trie ds problem because I was not able to find this on google.