Ingrassia Kurtz Sort - HolmesJJ/Data-Structures-and-Algorithms GitHub Wiki
详解
要点
- Generate all permutation of the input
- Sort the permutations based on number of inversion required using Bogo Sort
- Return the first element in the sorted list of permutations -> minimum number of inversions = possibly sorted
- 时间复杂度是O((n!)!)