anshu2002's blog

By anshu2002, history, 5 months 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

»
5 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by anshu2002 (previous revision, new revision, compare).

»
5 months ago, # |
  Vote: I like it +1 Vote: I do not like it
Spoiler