Open GL (JOGL) Bubblesort

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,716
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 25, 2009

pseudocode:

a: int array
n: length of a
flipped: boolean

for i = n - 1 down to 1
__flipped = false
__for j = 0 to i - 1
____if a[j] bigger a[j + 1]
______swap j, j + 1
______flipped = true
__if not flipped
____return

Category:

Entertainment

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (RawSoulStar)

  • That's a very nice graphical representation of a bubble sort! Was that slowed down for the sake of showing a graphical representation, or is that as fast as your computer could handle the operation?

  • it was slowed down, of course. it was rendered at ~2.5 frames per shift from one index to another.

    which computer can't sort a heap of 64 items in less than 100ms? :P

see all

All Comments (6)

Sign In or Sign Up now to post a comment!
  • such an inefficiency :D

  • Well my friend LuaPinapple's computer is so slow that an Etch-a-Sketch connected to his computer via a piece of string and some glue would render faster! ;)

    All joking aside, I honestly have encountered computers which cannot perform a basic bubble-sort any faster than your video demonstrates it!

  • cool!)))

  • wie es flitzt am ende :D

    und jetzt nach farben!

    x:

Loading...
Alert icon
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