Skip to content

Commit

Permalink
Quicksort worst case runtime is quadratic, O(n^2)
Browse files Browse the repository at this point in the history
Doug McIlroy's 1999 paper “A Killer Adversary for Quicksort” describes how to find inputs to the sort that display this quadratic behavior.
http://www.cs.dartmouth.edu/~doug/mdmspe.pdf
Here's a discussion on the topic by Russ Cox at http://research.swtch.com/qsort
  • Loading branch information
raypereda committed Mar 16, 2015
1 parent 41e1d33 commit 1c34408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tables.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h2 id="sorting">Array Sorting Algorithms</h2>
<td><a href="http://en.wikipedia.org/wiki/Quicksort">Quicksort</a></td>
<td><code class="orange">O(n log(n))</code></td>
<td><code class="orange">O(n log(n))</code></td>
<td><code class="orange">O(n log(n))</code></td>
<td><code class="red">O(n^2)</code></td>
<td><code class="yellow-green">O(log(n))</code></td>
</tr>
<tr>
Expand Down

0 comments on commit 1c34408

Please sign in to comment.