Need A Little Help

Revision en2, by _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?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English _spy_ 2022-06-29 12:31:25 1 Tiny change: ' is 5. Why' -> ' is 5. Why?'
en1 English _spy_ 2022-06-29 12:29:42 404 Initial revision (published)