ajaygupta007's blog

By ajaygupta007, history, 4 years ago, In English

how to count numbers of pairs in array of size n whose xor is equal than x for each value of 0<=x<=k ? 1<=n<=100000 1<=a[i]<=100000000 1<=k<=100000

  • Vote: I like it
  • -14
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it -10 Vote: I do not like it

You can just google before posting here. Here

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

    for each value of x between 0 to k this approach take O(n*n) time. please see constraint.