โก The most advanced terminal-based algorithm analysis suite ever built.
Graph Theory ยท Searching ยท Sorting ยท ADA ยท Speed Benchmarking ยท Futuristic UI
๐ Quick Start โข ๐ฆ Installation โข ๐ Usage โข ๐จ Features โข ๐ ๏ธ Troubleshooting
"I didn't just build an algorithm visualizer. I built a command center for computational thinking."
โ Ussu (@issu321)
USSU Algorithm Analyzer v4.0 is a cyberpunk-themed, fully interactive Python terminal application that transforms dry algorithm theory into an immersive, visual, and metrics-driven experience. Designed for students, researchers, CTF players, and engineers who refuse to use boring tools.
Whether you're learning BFS vs DFS, comparing Quick Sort vs Merge Sort, or benchmarking 8 different search algorithms across 10,000-element arrays โ this tool gives you real execution times, operation counters, and memory profiling in a terminal that looks like it belongs in a sci-fi movie.
For beginners who just want to run it NOW.
git clone https://github.com/issu321/algorithm-analyzer.git
cd algorithm-analyzer# Windows
pip install -r requirements.txt
# Linux / Kali / macOS
pip3 install -r requirements.txt# Windows
python app.py
# Linux / Kali / macOS
python3 app.pyThat's it. The cyberpunk banner appears, then the menu shows up. Press 1 to create your first graph, or 10 to try searching algorithms.
We provide automated installers for both Windows and Linux. Choose your path below.
# 1. Clone the repository
git clone https://github.com/issu321/algorithm-analyzer.git
cd algorithm-analyzer
# 2. Run the installer (double-click or run in PowerShell)
.\install.bat
# 3. Launch the application
python app.pyWhat install.bat does:
- โ Checks if Python 3.10+ is installed
- โ
Verifies
pipis available - โ
Creates workspace folders (
graphs/,reports/,data/) - โ
Installs all dependencies from
requirements.txt - โ Gives you a green "Installation Complete" banner
# 1. Clone the repository
git clone https://github.com/issu321/algorithm-analyzer.git
cd algorithm-analyzer
# 2. Make installer executable and run it
chmod +x install.sh
./install.sh
# 3. Launch the application
python3 app.pyWhat install.sh does:
- โ
Checks
python3andpip3 - โ Creates workspace folders
- โ Installs dependencies
- โ
Makes
app.pyexecutable (chmod +x)
# 1. Clone
git clone https://github.com/issu321/algorithm-analyzer.git
cd algorithm-analyzer
# 2. Install Python dependencies manually
pip3 install matplotlib networkx numpy
# 3. Create required directories
mkdir graphs reports data
# 4. Run
python3 app.py| Requirement | Version | Why |
|---|---|---|
| Python | 3.10+ | Type hints, match-case, performance |
| matplotlib | 3.7+ | Graph visualization |
| networkx | 3.1+ | Graph data structures & layouts |
| numpy | 1.24+ | Numerical operations (optional) |
๐ก No external libraries are required for the core algorithms. You can run BFS, DFS, Dijkstra, all searching, all sorting, and math tools using only Python's standard library. Install
matplotlib+networkxonly if you want the graph visualization feature (Option 14).
When you launch the app, you'll see this main menu:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ALGORITHM ANALYZER COMMAND CENTER v4.0 โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
โ [1] Graph Operations - Create, load, display graphs โ
โ [2] BFS Traversal - Breadth First Search โ
โ [3] DFS Traversal - Depth First Search โ
โ [4] Shortest Path (Dijkstra)- Single source shortest path โ
โ [5] All Pairs Shortest Path - Floyd-Warshall algorithm โ
โ [6] Longest Path (DAG) - Critical path analysis โ
โ [7] Minimum Spanning Tree - Prim's & Kruskal's โ
โ [8] Bellman-Ford - Negative weight handling โ
โ [9] Compare Graph Algos - Performance comparison โ
โ [10] Searching Algorithms - Linear, Binary, Jump, etc. โ
โ [11] Sorting Algorithms - Bubble, Merge, Quick, etc. โ
โ [12] Math Calculator - Advanced mathematical tools โ
โ [13] Complexity Reference - Big-O notation guide โ
โ [14] Visualize Graph - Matplotlib/NetworkX plot โ
โ [15] Benchmark Suite - Speed benchmark tests โ
โ [16] Speed Analysis - Algorithm speed profiling โ
โ [17] Save/Load Graph - Persist graph to file โ
โ [18] Generate Report - Export analysis report โ
โ [Q] Quit - Exit application โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
How to navigate: Type the number and press Enter. It's that simple.
Perfect for absolute beginners.
[USSU v4.0] Enter choice: 1 โ Go to Graph Operations
[1] Create Random Graph
[2] Create Custom Graph
[3] Load Graph from File
[4] Display Current Graph
[5] Graph Properties
Select: 1 โ Choose Random Graph
Number of vertices: 6
Edge probability (0-1, default 0.3): 0.5
Directed? (y/n): n
Weighted? (y/n): y
โ Random graph created!
[USSU v4.0] Enter choice: 2 โ Go to BFS
Start vertex: 0
Target vertex (optional): 5
[+] Target 5 found!
[+] Path: 0 โ 2 โ 5
[+] Distance: 2 edges
See how fast each algorithm really is.
[USSU v4.0] Enter choice: 11 โ Go to Sorting
[1] Bubble Sort
[2] Selection Sort
...
[12] Compare All Sorts
Select: 12
Array size for benchmark: 1000
Output:
Algorithm Time (ms) Time Comp. Space Stable
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Bubble Sort 42.1534 O(nยฒ) O(1) Yes
Selection Sort 15.2341 O(nยฒ) O(1) No
Insertion Sort 18.9012 O(nยฒ) O(1) Yes
Merge Sort 1.8234 O(n log n) O(n) Yes
Quick Sort 1.4521 O(n log n) O(log n) No
Heap Sort 2.1034 O(n log n) O(1) No
Shell Sort 2.8912 O(n logยฒ n) O(1) No
Find out which search wins.
[USSU v4.0] Enter choice: 10 โ Go to Searching
Select: 9 โ Compare All Searches
Array size for benchmark: 5000
Output:
Size Linear Binary Jump Interp Exp
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
100 0.0123 0.0012 0.0023 0.0015 0.0018
1000 0.1234 0.0015 0.0056 0.0018 0.0021
5000 0.6234 0.0018 0.0123 0.0021 0.0025
๐ Binary Search wins every time on sorted data. But now you have proof.
Turn numbers into art.
[USSU v4.0] Enter choice: 14
[*] Generating visualization...
[+] Saved: graphs/graph_viz_1716023456.png
What you get: A dark-themed PNG with cyan nodes, purple edges, and yellow weight labels. Perfect for reports, presentations, or your GitHub portfolio.
| Feature | Description |
|---|---|
| ๐จ Cyberpunk UI | ANSI box-drawing panels, progress bars, neon cyan accents |
| โฑ๏ธ Live Profiling | Every algorithm shows execution time (ms) + memory (KB) |
| ๐ข Operation Counters | See exact comparisons, swaps, array accesses, recursion depth |
| ๐ Benchmark Suite | Compare all algorithms across multiple input sizes automatically |
| ๐ผ๏ธ Graph Viz | Export publication-ready graph images via Matplotlib |
| ๐ Report Export | Save full session history to reports/ with timestamps |
| ๐งฎ 20+ Algorithms | Graph, Search, Sort, and Math โ all in one tool |
| ๐ Zero-Bloat Core | Runs without any external libraries for base functionality |
- Traversal: BFS, DFS (Iterative)
- Shortest Path: Dijkstra, Bellman-Ford, Floyd-Warshall
- MST: Prim's (Priority Queue), Kruskal's (Union-Find)
- DAG: Longest Path via Topological Sort
- Linear Search โ
O(n) - Binary Search (Iterative & Recursive) โ
O(log n) - Jump Search โ
O(โn) - Interpolation Search โ
O(log log n)avg - Exponential Search โ
O(log n) - Ternary Search โ
O(logโ n) - Fibonacci Search โ
O(log n)
- Bubble Sort โ
O(nยฒ)| Stable - Selection Sort โ
O(nยฒ)| Unstable - Insertion Sort โ
O(nยฒ)| Stable - Merge Sort โ
O(n log n)| Stable - Quick Sort โ
O(n log n)avg | Unstable - Heap Sort โ
O(n log n)| Unstable - Shell Sort โ
O(n logยฒ n)| Unstable - Cocktail Shaker Sort โ
O(nยฒ)| Stable - Comb Sort โ
O(nยฒ/2แต)| Unstable - Counting Sort โ
O(n+k)| Stable | Integers only - Radix Sort (LSD) โ
O(d(n+k))| Stable | Integers only
- Factorial, Fibonacci (3 methods), GCD (Euclidean)
- Fast Exponentiation, Primality Test, Sieve of Eratosthenes
- Matrix Multiplication (naive), Big-O Complexity Reference
algorithm-analyzer/
โโโ app.py โ ๐ Main application (run this)
โโโ install.bat โ ๐ช Windows installer
โโโ install.sh โ ๐ง Linux/Kali installer
โโโ requirements.txt โ ๐ฆ Python dependencies
โโโ INPUTGUIDE.md โ ๐ Step-by-step input manual
โโโ README.md โ ๐ You are here
โโโ graphs/ โ ๐ผ๏ธ Auto-generated visualizations
โโโ reports/ โ ๐ Auto-generated analysis reports
โโโ data/ โ ๐ Your custom graph files
Tested on Intel i7-12700H | Python 3.11 | All times in milliseconds
| Input Size | Bubble Sort | Quick Sort | Merge Sort | Binary Search |
|---|---|---|---|---|
| 100 | 0.8 ms | 0.1 ms | 0.2 ms | 0.001 ms |
| 1,000 | 45.2 ms | 1.4 ms | 2.1 ms | 0.002 ms |
| 10,000 | 4,200 ms | 18.5 ms | 24.3 ms | 0.003 ms |
๐ก Why Bubble Sort dies at 10K:
O(nยฒ)= 100,000,000 operations. Quick Sort handles it in 18ms becauseO(n log n)= ~130,000 operations. This is why we benchmark.
Windows: Download from python.org. Check "Add Python to PATH" during install.
Linux: sudo apt update && sudo apt install python3 python3-pip
Windows: python -m pip install ...
Linux: Use pip3 instead of pip
pip install matplotlib networkx๐ก The app still works without these โ you just can't use Option 14 (Visualize).
Use Windows Terminal or PowerShell instead of legacy CMD. Linux terminals work perfectly out of the box.
Options 2โ9 and 14 require a graph. Press 1 at the main menu, then 1 again to create a random graph.
Bubble Sort and Insertion Sort are intentionally skipped for arrays > 1000 elements because O(nยฒ) would freeze your terminal. This is a feature, not a bug.
Never use recursive method for n > 30. It has O(2โฟ) complexity. Use iterative or memoization instead.
Contributions make the open-source community an amazing place to learn and create.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/UltraFeature) - Commit your Changes (
git commit -m 'Add some UltraFeature') - Push to the Branch (
git push origin feature/UltraFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.