Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🔬 SORT//LAB — Bubble vs Merge Complexity Analyzer

An interactive algorithm visualization and benchmarking web tool comparing the execution time and step complexities of Bubble Sort vs Merge Sort.


✨ Features

  • 📊 Step-by-Step Algorithm Visualization: Real-time visual representation of comparisons, swaps, and recursive splits.
  • ⚡ Complexity Benchmark Comparison:
    • Bubble Sort: $O(n^2)$ time complexity demonstration on randomized arrays.
    • Merge Sort: $O(n \log n)$ divide-and-conquer efficiency showcase.
  • 🎛️ Interactive Controls:
    • Custom array input size ($N=5$ to $N=100+$).
    • Adjustable animation speed and step-by-step playback.
    • Real-time comparison metrics (comparisons count, swap operations, elapsed execution time).

📊 Complexity Breakdown

Algorithm Best Case Average Case Worst Case Space Complexity
Bubble Sort $O(n)$ $O(n^2)$ $O(n^2)$ $O(1)$
Merge Sort $O(n \log n)$ $O(n \log n)$ $O(n \log n)$ $O(n)$

🚀 Getting Started

Local Setup

Open index.html directly in any web browser, or serve locally:

git clone https://github.com/Srinath64312/sortlab-complexity-analyzer.git
cd sortlab-complexity-analyzer

# Launch local server
python -m http.server 8000

Visit http://localhost:8000 to interact with the analyzer.


📄 License

Open-source under the MIT License.

About

Interactive algorithm visualizer comparing Bubble Sort and Merge Sort time complexity.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages