Twenty fundamental computer-science algorithms, each implemented in TypeScript, Python and C++ — 60 clean, documented, standalone reference implementations with complexity analysis.
Want to see them run? The interactive visualizer and simulation lab lives in THE HUB — MASTER-INDEX (live demo).
| Category | Algorithm | TypeScript | Python | C++ |
|---|---|---|---|---|
| Sorting | Quick Sort | TS | Python | C++ |
| Merge Sort | TS | Python | C++ | |
| Bubble Sort | TS | Python | C++ | |
| Insertion Sort | TS | Python | C++ | |
| Heap Sort | TS | Python | C++ | |
| Searching | Binary Search | TS | Python | C++ |
| Linear Search | TS | Python | C++ | |
| Jump Search | TS | Python | C++ | |
| Interpolation Search | TS | Python | C++ | |
| Exponential Search | TS | Python | C++ | |
| Graphs | Dijkstra | TS | Python | C++ |
| Breadth-First Search | TS | Python | C++ | |
| Depth-First Search | TS | Python | C++ | |
| Bellman-Ford | TS | Python | C++ | |
| Floyd-Warshall | TS | Python | C++ | |
| DP & Math | Fibonacci (DP) | TS | Python | C++ |
| 0/1 Knapsack | TS | Python | C++ | |
| Longest Common Subsequence | TS | Python | C++ | |
| Prim's MST | TS | Python | C++ | |
| Sieve of Eratosthenes | TS | Python | C++ |
Best, average and worst-case time complexity plus space complexity for every algorithm are summarized in Complexity.md.
| Language | Style | Focus |
|---|---|---|
| TypeScript | Functional, strongly typed | Generics and interfaces for type-safe, reusable code |
| Python | Pythonic, procedural | Readability and idiomatic use of the standard library |
| C++ | Systems-level | STL containers, memory efficiency and execution speed |
Every file is self-contained and documents its time and space complexity, so it can be read, copied or run on its own.
# TypeScript (Node.js 20+)
npx tsx TypeScript/Sorting/QuickSort.ts
# Python 3
python Python/Graphs/Dijkstra.py
# C++ (C++17)
g++ -std=c++17 CPP/DP_Math/Knapsack.cpp -o knapsack && ./knapsackC++ files include a runnable main() demo; TypeScript and Python files end with a commented example usage block — uncomment it to see output.
TypeScript/ · Python/ · CPP/
├── Sorting/
├── Searching/
├── Graphs/
└── DP_Math/
Complexity.md
Abdellah Sheikh — abdellahsheikh.dev · LinkedIn