17

My favorite sorting algorithm.

Comments
  • 3
    I feel like xkcd 1861 applies here…
  • 0
    What about the cost of checking if it's empty?
  • 0
    Ah, but checking for step two is O(n), hence the algorithm can never be O(1)!
Add Comment