ss1073857's blog

By ss1073857, history, 4 years ago, In English

Given an array of N numbers with M distinct no . Find minimum no. of numbers such that on permuting those in any order , digit with same value come together. Ex: 1 3 1 5 6 Choosing indices 0 and 1 or 1 and 2 makes all the one’s together So ans: 2 ( two indices are chosen)

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