Need A Little Help

Правка en2, от _spy_, 2022-06-29 12:31:25

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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский _spy_ 2022-06-29 12:31:25 1 Tiny change: ' is 5. Why' -> ' is 5. Why?'
en1 Английский _spy_ 2022-06-29 12:29:42 404 Initial revision (published)