Lecture 3: Sorting - MIT OpenCourseWare
https://ocw.mit.edu/courses/6-006-introduction-to-algorithms-spring-2020/6d1ae5278d02bbecb5c4428928b24194_MIT6_006S20_lec3.pdf
WEBPermutation Sort. There are n! permutations of A, at least one of which is sorted. For each permutation, check whether sorted in Θ(n) Example: [2, 3, 1] → {[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]} def permutation_sort(A): ’’’Sort A’’’. for …
DA: 82 PA: 24 MOZ Rank: 85