anshu2002's blog

By anshu2002, history, 2 years ago, In English

There is an array consisting of numbers from 0 to 9 You have to divide the array into buckets such that every occurance of each number falls in only one bucket So find the maximum number of buckets you can form Example arr = {0,0,1,1,2,1,7,8,7,9,9}

ans = 4

({0,0},{1,1,2,1},{7,8,7},{9,9})

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
2 years ago, # |
  Vote: I like it +1 Vote: I do not like it
Spoiler