Jump to content

Wikipedia:Featured picture candidates/Quicksort

From Wikipedia, the free encyclopedia
The Quicksort algorithm has three steps: 1) Pick an element, called a pivot, from the list.
2) Reorder the list so that all elements which are less than the pivot come before the pivot and so that all elements greater than the pivot come after it (equal values can go either way). After this partitioning, the pivot is in its final position. This is called the partition operation.
3) Recursively sort the sub-list of lesser elements and the sub-list of greater elements.
The Heapsort algorithm
Reason
Illustrates the concept well
Articles this image appears in
Quicksort
Creator
User:RolandH
  • Comment Given the crucial nature of the pivot element in the algorithm, is there any chance that the animation could mark at each point which the pivot element is? This seems an odd omission. TSP 17:29, 1 June 2007 (UTC)[reply]
  • That is a valid point, I would really like to see the pivot point marked clearly as well, I know it is in the center of the arrows but that may not be obvious. Perhaps an arrow above it pointing down? Or perhaps just a red line in the middle of the shaded arrows. (H) 17:51, 1 June 2007 (UTC)[reply]
  • OK, agreed (the creator is me). I don't have much experience with wikipedia, but what I want to do is 1) fix some flaws that were pointed out to me so far, and at the same time 2) finish and release the code responsible for generating the images (a Ruby script which needs Cairo and ImageMagick). I need at least one more day to do that. Editing the animations by hand is always possible, but doing so will make the scripts obsolete. RolandH 11:01, 5 June 2007 (UTC)[reply]
  • Comment. The caption seems wrong (or the image is wrong). What the image shows is that the "pivot" (shown in red) is kept in its current position until the rest of the items are sorted to the left or right of where the pivot will be placed, and THEN the pivot is moved to that center spot. Is this actually how quicksort works? If so, then the caption should be fixed; if not, then the image should be fixed. — BRIAN0918 • 2007-06-04 17:03Z
  • Support, and also agree that including other sort algorithm animations would be nice. -LesPaul75 21:43, 4 June 2007 (UTC)[reply]
  • Support - Great illustration of the algorithms --ZeWrestler Talk 22:30, 4 June 2007 (UTC)[reply]
  • Support - Beautifully illustrated Alvesgaspar 22:56, 4 June 2007 (UTC)[reply]

Promoted Image:Sorting quicksort anim.gif MER-C 03:14, 8 June 2007 (UTC)[reply]