How to solve it?

Revision en1, by ss1073857, 2020-09-18 21:52:50

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)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ss1073857 2020-09-18 21:52:50 292 Initial revision (published)