YouTube home Comedy Week on YouTube
Upload

Visualization of Quick sort

udiprod udiprod·11 videos
725
354,581
Like     Dislike 28

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to like udiprod's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to dislike udiprod's video.

Sign in to YouTube

Sign in with your Google Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to add udiprod's video to your playlist.

Uploaded on Feb 21, 2009

See a new version of this video: http://www.youtube.com/watch?v=aXXWXz... (HD + narration)

A demonstration of the Quick Sort sorting algorithm.

Visit my homepage, http://www.zutopedia.com/udia.html, or read about my latest book http://www.zutopedia.com

It demonstrates two comparison sorting algorithms: Bubble sort and Quick sort.
Comparison sorting algorithms are only allowed to 'see' the data through a sequence of pair-wise comparisons, therefore they are applicable to any type of comparable objects: numbers, strings, colored balls, etc

Bubble sort is very simple but has poor performance. A comparison sorting algorithm's performance is usually measured by the number of comparisons it makes. Bubble sort performs on the order of n^2 comparisons to sort n elements.

Quick sort is only slightly more complicated but usually performs much better (as demonstrated in the video). It performs on average an order of n log(n) comparisons to sort n elements. This is much lower than n^2 for large values of n. However, if the algorithm makes some 'unlucky' choices it might require n^2 comparisons after all.

Other algorithms exist that guarantee the number of comparisons will not exceed n log(n), however, in practice Quick sort usually out-performs all other comparison sorting algorithms due to its simplicity.

If other operations other than pair-wise comparisons are allowed, then a broader range of algorithms can be used. Some of them can perform much faster than Quick sort, but they are limited to a particular type of elements, e.g., numbers is a certain range.

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

Loading icon Loading...

Ratings have been disabled for this video.
Rating is available when the video has been rented.
This feature is not available right now. Please try again later.

Uploader Comments (udiprod)

  • Vibol Lee

    at least give bubble sort enough respect to let him finish before cutting off the video

    · 178

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Vibol Lee's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Vibol Lee's comment.
  • udiprod

    Solved! Please see the new, HD, narrated version of this video which also let's bubble sort finish.

    (see link in description or in an annotation at the beginning of the video).

    · 8

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate udiprod's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate udiprod's comment.
    in reply to Vibol Lee (Show the comment)

Top Comments

  • the0th

    this would be useful if i wasn't colour blind.

    · 84

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate the0th's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate the0th's comment.

All Comments (217)

Sign in now to post a comment!
  • wowcolors

    Quick sort.. Yolo

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate wowcolors's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate wowcolors's comment.
  • lecirconflex

    You lost me at comic sans.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate lecirconflex's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate lecirconflex's comment.
  • chandanaYou

    Thanks for the wonderful video. Please keep it up! Best regards.

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate chandanaYou's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate chandanaYou's comment.
  • ySomic

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ySomic's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate ySomic's comment.
  • crimsonhat

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate crimsonhat's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate crimsonhat's comment.
  • TheEpicCook

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate TheEpicCook's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate TheEpicCook's comment.
  • Jordan Wong

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Jordan Wong's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Jordan Wong's comment.
  • Darryl Hua

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Darryl Hua's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Darryl Hua's comment.
  • Danny Wong

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Danny Wong's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Danny Wong's comment.
  • Kollin Chen

    JOO

    ·

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Kollin Chen's comment.

    Sign in to YouTube

    Sign in with your YouTube Account (YouTube, Google+, Gmail, Orkut, Picasa, or Chrome) to rate Kollin Chen's comment.
  • Loading comment...
Loading...
Loading...
Working...
Sign in to add this to Watch Later