Skip to content

Instantly share code, notes, and snippets.

@zulman
Created February 15, 2013 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zulman/4958850 to your computer and use it in GitHub Desktop.
Save zulman/4958850 to your computer and use it in GitHub Desktop.
qsort comparisons test data
| | # of Comparisons with |
| Array | first | last | median |
| | pivot |
|-------------+-------+------+--------|
| 1 | 0 | 0 | 0 |
| 1 2 | 1 | 1 | 1 |
| 1 2 3 | 3 | 3 | 2 |
| 1 2 3 4 | 6 | 6 | 4 |
| 9 6 3 7 2 4 | 11 | 9 | 8 |
| 9 6 3 7 4 2 | 13 | 13 | 9 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment