Wikipedia:Featured picture candidates/Quicksort

From Wikipedia, the free encyclopedia

[edit] Quicksort algorithm

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 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
The Heapsort algorithm
Reason
Illustrates the concept well
Articles this image appears in
Quicksort
Creator
User:RolandH
  • Support as nominatorRavedave 23:58, 31 May 2007 (UTC)
  • Support Demonstrates a complex procedure well. It is clear what is going on. (H) 00:00, 1 June 2007 (UTC)
  • support great! I'd love to see one of these for merge sort, bubble sort etc... it would make a smashing FP set. Debivort 03:03, 1 June 2007 (UTC)
  • support whoa...it took me a minute to figure it out but now it's perfectly clear thanks to this.--Analogue Kid 04:15, 1 June 2007 (UTC)
  • Support Simple and effective.--HereToHelp 11:55, 1 June 2007 (UTC)
  • Comment - could you slow it down just a little? 129.215.149.96 15:45, 1 June 2007 (UTC)
  • I like the current speed. (H) 15:47, 1 June 2007 (UTC)
    • As do I, so much so that I support it in the current state. -- Phoenix2 (holla) 16:26, 1 June 2007 (UTC)
  • 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)
  • 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)
  • I think the red element is the pivot element. Debivort 19:57, 1 June 2007 (UTC)
  • It is. -Ravedave 22:16, 1 June 2007 (UTC)
  • Hmm, I thought the center of the grey area with the arrows <-> was the pivot point. (H) 20:35, 1 June 2007 (UTC)
  • Ah, I get it now. (H) 22:17, 1 June 2007 (UTC)
  • Support, I like it! --Golbez 21:28, 1 June 2007 (UTC)
  • Support I guess I'll agree with all you guys...I don't know what I'm looking at since algorithms are not my forte. However, it does present the subject in a very clear manner. Encyclopedic and FP status worthy. Jumping cheese Cont@ct 22:21, 1 June 2007 (UTC)
  • Support - It could hardly be more enc than this. Any wikinerds with a desire for FP notches on their bedposts should feel free to nominate the other famous sorts and count on my vote. --TotoBaggins 23:32, 1 June 2007 (UTC)
  • Before we do that, I'm going to ask the creator if he/she has others we can include in an FP set. Debivort 01:23, 2 June 2007 (UTC)
  • I can't follow the heapsort one unfortunately... Debivort 18:45, 3 June 2007 (UTC)
  • Needs to be slowed down vastly. I'll see about adding an overview of how it works to the caption. -Ravedave 22:48, 3 June 2007 (UTC)
  • 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)
  • 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)
  • Support - Great illustration of the algorithms --ZeWrestler Talk 22:30, 4 June 2007 (UTC)
  • Support - Beautifully illustrated Alvesgaspar 22:56, 4 June 2007 (UTC)

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