TEC-Bridge Logo

Bubble Sort Visualizer

STEM Interactive Visual Learning Program at TEC-Bridge AI

Setup Array

Sort Controls

Array Visualization

Algorithm Steps

How to Use

  1. Setup: Enter numbers separated by commas or click "Random" to generate an array
  2. Sort: Click "Start Sort" to begin the bubble sort process
  3. Step Through: Click "Next Step" to see each step of the algorithm execution
  4. Run Through: Click "Run Through" to automatically execute all steps in sequence
  5. Observe: Watch the array elements change colors and algorithm steps highlight on the right
  6. Reset: Click "Reset" to start over with a new sort

Colors: Yellow = Current element, Purple = Left element, Red = Upper boundary, Blue = Comparing, Green = Sorted

Bubble Sort Concept

Bubble Sort is a sorting algorithm that repeatedly compares adjacent elements and swaps them if they are in the wrong order, "bubbling" larger elements to the end.

How it works:

  • Compare adjacent elements from left to right
  • Swap them if left element is greater than right element
  • Continue until end of unsorted section
  • Reduce unsorted section and repeat
  • Largest elements "bubble up" to their correct positions

Time Complexity: O(n²) - compares adjacent pairs repeatedly

Bubble Sort Code Implementation

Rate This Learning Tool

Clarity of Visualization:
Interactivity:
Educational Value:
Performance:
Intuitivity & Usability:
Overall Evaluation:

© 2025 TEC-Bridge AI. All rights reserved. | Contact: contact@tec-bridge.ai | https://tec-bridge.ai