TEC-Bridge Logo

Heap 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 heap 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 heap building and extraction process
  6. Reset: Click "Reset" to start over with a new sort

Colors: Orange = Root, Blue = Parent, Purple = Child, Yellow = Comparing, Light Blue = Heap Boundary, Green = Sorted

Heap Sort Concept

Heap Sort is a comparison-based sorting algorithm that uses a binary heap data structure to sort elements efficiently.

How it works:

  • Build a max heap from the unsorted array
  • Extract the maximum element (root) and place at end
  • Reduce heap size and restore heap property
  • Repeat until all elements are sorted
  • Uses heapify to maintain heap structure

Time Complexity: O(n log n) guaranteed, in-place sorting

Heap 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