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 / 110

Initial array loaded.

Sorting Canvas

12 values

130
781
432
873
834
535
396
607
938
699
1310
4911

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.