Ingrassia Kurtz Sort - HolmesJJ/Data-Structures-and-Algorithms GitHub Wiki

详解

最慢的排序算法

要点

  1. Generate all permutation of the input
  2. Sort the permutations based on number of inversion required using Bogo Sort
  3. Return the first element in the sorted list of permutations -> minimum number of inversions = possibly sorted
  • 时间复杂度是O((n!)!)