Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Inversion Count

Правка en1, от 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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский smartin 2015-10-30 16:11:39 311 Initial revision (published)