Please read the new rule regarding the restriction on the use of AI tools. ×

Inversion Count

Revision en1, by smartin, 2015-10-30 16:11:39

Given a list of elements, you can remove either left or right element and add this to a new list either as first element or last element. You have to do this to form a new list such that inversions are minimized. (inversion means l [i] > l [j] for i<j). How to approach this problem efficiently?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English smartin 2015-10-30 16:11:39 311 Initial revision (published)