Skip to content

Slow Sort

Aashish Bharadwaj edited this page Mar 16, 2018 · 3 revisions

Average time complexity - O(n ^ (log2(n))

Best-Case time complexity - Ω(n ^ ((log2(n)) / 2))

Worst-Case time complexity - O(n ^ (log2(n))

Worst-case space complexity - Ω(3n)

Slow Sort is a joke algorithm.

Let's say you have the following array:

4, 1, 5, 2, 3

Slow Sort goes through the following when sorting. Don't ask me how/why, I have no idea.

1, 4, 5, 2, 3

1, 4, 3, 2, 5

1, 4, 2, 3, 5

1, 3, 2, 4, 5

1, 2, 3, 4, 5

Clone this wiki locally