Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Bubble Sort

Loading...

Sign in or sign up now!
53,449
Loading...
Alert icon
Sign in or sign up now!
Alert icon
Ratings have been disabled for this video.

Uploaded by on Mar 17, 2007

*** ACCOUNT CHANGE TO ROBMKH***

This video is a demonstration of what the computer goes through durring a bubble sort.

Category:

Film & Animation

Tags:

License:

Standard YouTube License

Link to this comment:

Share to:

Uploader Comments (UltimaChaosVincent)

  • it actually doesnt work like that, bubblesort sorts from right to left... you can check this on wikipedia :)

    anyway thanks for the video, helped me a lot :D

  • Actually, that's a misconception. It depends if you start with array.length() and work your way down, or if you start at index 0 and work your way up. You have to adjust the less than and greater than with in the if...then statement for their respective "flavor". Hope this helps :D

  • if u adjust the if by switching greater than or less than.. doesnt that change from lets say, ascending order to descending for example? :)

    and yes, it depends from where you start :$

  • Thats the point? I'm confused by your comment, sorry. If you want to go from right to left and maintain the order you'd have to switch operators.

Top Comments

  • Maybe it's inefficient and almost entirely useless, but you can't really hate Bubblesort. It's got such an adorable name!

  • this is so great ;) if anybody is asking me how to bubble sort, i start singing the chocobo song ^^

see all

All Comments (35)

Sign In or Sign Up now to post a comment!
  • @agentdarkboote Of course! The bidirectional bubble sort! aka the Cocktail sort according to Wikipedia!

    I guess one can improve by not comparing the last item placed in each direction.

  • Quicksort forever !!!

  • hi there !

  • cool

  • Dddddddeeeeeeeaaaaaaaddddddd account now.

  • @SirCatpaw Close: you're describing the bidirectional bubble sort :D

  • @SirCatpaw Cocktail Sort.

  • @SirCatpaw

    maybe it's a doubly bubble sort ^_^

    :-p 

  • oh now i understand!

  • What machine's making the music?

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more