Your privacy choices

KiwiBee uses optional Google Analytics, Google Ads, and Meta Pixel cookies to understand adult visitors, measure completed sign-ups, and improve campaigns. Essential cookies always stay on. OpenAI’s ChatGPT Ads Pixel also measures page views and completed enquiries after advertising consent, and may use hashed contact details for matching. Privacy policy

Skip to main content

Sorting Algorithms

About this simulation

This simulation turns sorting into something you can watch. Each bar is a number, and the chosen algorithm compares bars and swaps them until they rise in order. Students pick one of five algorithms, set how many bars there are and how many steps run each second, and can shuffle to start again. Readouts count comparisons, swaps or writes and show the state. Running two algorithms on the same number of bars shows why some are far faster on big lists, which makes it a strong starting point for computing lessons on efficiency.

What students can explore

  • Pick Bubble, press Shuffle, and note the Comparisons and Swaps / writes counts when it finishes.
  • Repeat with Quick or Merge at the same number of Bars and compare the counts.
  • Raise Bars to 80 and see how much longer the slower algorithms take.
  • Slow Steps/s down and watch which bars are being compared and which were just swapped.
  • Compare Insertion and Selection on the same shuffled row.

Learning objectives

  1. 1Describe how bubble, insertion, selection, quick and merge sort work.
  2. 2Compare algorithms by counting comparisons and swaps.
  3. 3Explain why quick and merge sort scale better than the simpler sorts.
  4. 4Predict how the work grows when the list gets longer.

Questions teachers ask

Is it free to use?

Yes. It is free and runs in any modern browser, including whiteboards and tablets, with no sign-up needed.

Which sorting algorithm is fastest?

On large lists quick sort and merge sort are much faster, taking about n log n steps, while bubble, insertion and selection sort take about n squared steps. On very short lists the difference is small.

What do the bar colors mean?

White bars are being compared, and red bars were just swapped or written. Merge sort counts each write into the array as a swap, so its swap total reflects writes.

How do I use the sorting simulation?

Choose an Algorithm, set the number of Bars and Steps/s, then press Shuffle and watch it sort. Read Comparisons and Swaps / writes to compare methods.

Embed this simulation

Drop it into your LMS, blog, or class site — free.

<iframe src="https://kiwibee.io/en/simulations/sorting-algorithms-3d-simulation/embed" title="Sorting Algorithms | KiwiBee" loading="lazy" allowfullscreen style="width:100%;height:min(70vh,620px);min-height:420px;border:0;border-radius:16px"></iframe>

Continue exploring

Bring interactive science into your classroom

KiwiBee's free teacher workspace brings lesson planning, worksheets, classroom tools, and gradebook together in one place.

Start free and create your first class

or explore the teacher workspace →