Interactive Learning Tool

Algorithm Visualizer

See how algorithms work through interactive animations and real-time execution flow.

Algorithm Selector

Input

Playback

Status: Paused

Speed

Toggles

Tip: Use Start + Next Step together for interview-style walkthrough.

Bubble Sort

Step 1 / 96

Initial array loaded.

Sorting Canvas

12 values

870
231
182
433
604
405
336
737
748
279
5410
7811

What it does

Repeatedly compares adjacent elements and swaps them if they are in the wrong order.

When to use

Use for teaching, very small inputs, or when simple in-place logic is preferred.

Strengths

  • Simple to implement
  • Stable sort
  • In-place memory usage

Weaknesses

  • Slow on medium and large datasets
  • Many repeated comparisons

Real-world use cases

  • Educational demos
  • Tiny data batches
  • Algorithm intuition building

Interview Insight

Bubble Sort is easy to reason about, but its quadratic growth makes it impractical beyond small inputs.