Sorting Algorithms Visualized

Video is ready, Click Here to View ×

I wrote a Java program that applies various sorting algorithms (bubble, selection, insertion, quick, and heap sort so far) on a scrambled image.

I have always been a visual learner and I hope this video will help others get a better grasp on some of the sorting algorithms they may be learning in classes.

The speed variable is simply how many iterations of the sorting algorithm execute before the display is updated.

I will try to implement more in the future. If you are curious as to how I made this program, don’t hesitate to ask.

A tutorial video is now available:

Let me know what you think in the comment section down below!


30 thoughts on “Sorting Algorithms Visualized”

  1. Hey guys! Thanks for the views and feedback. I decided to make a tutorial video explaining step by step how I made this. The tutorial video link is in the description of this video. Let me know if you guys have any more questions!

  2. This is beautiful! Did you do all the image sampling to make the video, using Java? and how did you actually display the pixels? I mean they are nothing but numbers when they are being sorted. I loved this and I love Java! So, want to know more. Can I find the source code on GitHub?

  3. What's the purpose of sorting algorithms like this? Is it for data compression/encoding? Are the unsorted heaps basically what JPG's look like before they get interpreted by the program? I realize that the encoded data wouldn't have a "visual" image, but I'm just trying to make sure I understand this right.

  4. Can this kind of software work with any kind of simple image? If so could I take a look at your software? I work with a band and would like to use software like this to make real time concert visuals with the band's logo

  5. Amazing idea!
    Right now I need to make a 'Sorts' assignment for my CS students. And this was so inspiring!
    (I assume the general idea is to assign an ID to each pixel, shuffle them, and show the current state of the sequence during each iteration)

    Thanks for sharing 😀
    (Sorry for my bad English, greetings from México)

Leave a Reply

Your email address will not be published. Required fields are marked *