TEC-Bridge Logo

Merge Sort Visualizer

STEM Interactive Visual Learning Program at TEC-Bridge AI

Setup Array

Sort Controls

Array Visualization

Temporary Array:

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 merge 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 divide and conquer process with temporary array merging
  6. Reset: Click "Reset" to start over with a new sort

Colors: Blue = Left Half, Purple = Right Half, Orange = Merging, Yellow = Comparing, Light Blue = Temp Array, Green = Sorted

Merge Sort Concept

Merge Sort is a divide-and-conquer sorting algorithm that recursively divides the array into halves, sorts them, and merges them back together.

How it works:

  • Divide array into two halves recursively
  • Base case: arrays with 1 element are already sorted
  • Merge two sorted halves into temporary array
  • Compare elements from both halves and copy smaller first
  • Copy remaining elements and merge back to original

Time Complexity: O(n log n) guaranteed, stable sort

Merge 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