Bubble Sort Algorithm

Bubble sort is a very simple algorithm for sorting used by beginners in computer science. The algorithm compares each pair of adjacent elements and switches their positions if they are in reverse order, repeating the process until the array is completely sorted. The algorithm is inefficient for large sets of data because its complexity is .


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


[1] A. Cortesi. "Visualising Sorting Algorithms." (Jan 22, 2013) corte.si/posts/code/visualisingsorting/index.html.
[2] AlgoRythmics. Bubble-sort with Hungarian ("Csángó") folk dance. [Video] (Jan 22, 2013) www.youtube.com/watch?v=lyZQPjUT5B4.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.