Блог пользователя ss1073857

Автор ss1073857, история, 4 года назад, По-английски

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)

  • Проголосовать: нравится
  • -9
  • Проголосовать: не нравится