Worstsort

Worstsort

In general, is a correct sorting algorithm which takes time , where denotes the -fold iterated factorial of , that is, and . =)

Worstsort is parameterized by a function on natural numbers, and calls with a recursion depth given by the function applied to the length of the list. And then of course we take that number and iterate factorial that many times on .

Source: byorgey.wordpress.com