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

Автор _spy_, история, 21 месяц назад, По-английски

Based on this problem, could you please tell me that, what will be the rearrangement of array [1,1,2,3,4,5,6,7,7] ?

I think the best rearrangement is [1,2,3,4,7,7,6,5,1] and here LIS(a) = 5 and LIS(a’) = 4. So, min(LIS(a), LIS(a’)) = 4. So, based on my thought, the answer should be 4. But based on the tutorial, the answer is 5. Why?

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