Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
shard: [1/10, 2/10, 3/10, 4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 10/10]
steps:
- uses: actions/checkout@v6

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
shard: [1/8, 2/8, 3/8, 4/8, 5/8, 6/8, 7/8, 8/8]
shard: [1/10, 2/10, 3/10, 4/10, 5/10, 6/10, 7/10, 8/10, 9/10, 10/10]
steps:
- uses: actions/checkout@v6

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Algorithm visualization web app for learners. Step through algorithms with synch

## Features

- **284 Algorithms across 14 Categories** with interactive visualizations (bar charts, SVG graphs/trees, CSS grids, DP tables, and more)
- **367 Algorithms across 14 Categories** with interactive visualizations (bar charts, SVG graphs/trees, CSS grids, DP tables, and more)
- **Multi-Language Code Display**: TypeScript, Python, and Java with synchronized line highlighting via Monaco Editor
- **Step-by-Step Playback**: Play, pause, step forward/backward, scrub, adjustable speed (0.25x–4x)
- **Category-Specific Input Editors**: Editable arrays, targets, grids, text patterns, and matrices
Expand All @@ -19,7 +19,7 @@ Algorithm visualization web app for learners. Step through algorithms with synch

## Algorithms

**284 algorithms across 14 categories**: Sorting (53 algorithms across 9 technique subcategories), Searching, Graph (28 algorithms across 10 technique subcategories), Pathfinding (27 algorithms across 5 technique subcategories), Dynamic Programming (32 algorithms across 6 technique subcategories), Arrays (44 algorithms across 11 technique subcategories), Trees, Linked Lists, Heaps (28 algorithms across 4 technique subcategories), Stacks & Queues, Hash Maps (28 algorithms across 8 technique subcategories), Strings, Matrices (20 algorithms across 5 technique subcategories), and Sets (19 algorithms across 5 technique subcategories).
**367 algorithms across 14 categories**: Sorting (53 algorithms across 9 technique subcategories), Searching, Graph (28 algorithms across 10 technique subcategories), Pathfinding (27 algorithms across 5 technique subcategories), Dynamic Programming (32 algorithms across 6 technique subcategories), Arrays (44 algorithms across 11 technique subcategories), Trees, Linked Lists, Heaps (28 algorithms across 4 technique subcategories), Stacks & Queues (28 algorithms across 8 technique subcategories), Hash Maps (28 algorithms across 8 technique subcategories), Strings (32 algorithms across 6 technique subcategories), Matrices (20 algorithms across 5 technique subcategories), and Sets (19 algorithms across 5 technique subcategories).

See the [full Algorithm Catalog](docs/algorithms-catalog.md) for the complete listing with visualizer descriptions and technique subcategories.

Expand Down Expand Up @@ -57,7 +57,7 @@ Welcome to the definitive map of AlgoFlow. We maintain 12 specialized guides map
| Debug step-generation crashes | 🐛 [Debugging](docs/debugging.md) |
| Work on UI layout or styling | 💅 [Design System](docs/design-system.md) |
| Write algorithm learning modules | 📚 [Educational Content Guide](docs/educational-content-guide.md) |
| Browse all 284 algorithms | 🔍 [Algorithm Catalog](docs/algorithms-catalog.md) |
| Browse all 367 algorithms | 🔍 [Algorithm Catalog](docs/algorithms-catalog.md) |
| Understand AI hooks & plugins | 🤖 [Development System](docs/claude-system.md) |

> [!TIP] > **First-time contributors:** Do not try to hack around aimlessly. Start strictly at the [New Developer Onboarding Guide](docs/onboarding.md). It dictates the hard boundary between the UI logic and the engine.
Expand Down
76 changes: 67 additions & 9 deletions docs/algorithms-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Algorithm Catalog

Complete listing of all 284 algorithms available in AlgoFlow, organized by category with visualizer descriptions and technique subcategories.
Complete listing of all 367 algorithms available in AlgoFlow, organized by category with visualizer descriptions and technique subcategories.

> **Prerequisites:** None — this is a reference document.

Expand All @@ -19,7 +19,7 @@ Complete listing of all 284 algorithms available in AlgoFlow, organized by categ
- [Heaps (28)](#heaps-28-algorithms)
- [Stacks & Queues (1)](#stacks--queues-1-algorithm)
- [Hash Maps (28)](#hash-maps-28-algorithms)
- [Strings (1)](#strings-1-algorithm)
- [Strings (32)](#strings-32-algorithms)
- [Matrices (20)](#matrices-20-algorithms)
- [Sets (19)](#sets-19-algorithms)

Expand Down Expand Up @@ -437,13 +437,71 @@ Algorithms leveraging hash table lookups, frequency counting, grouping, tracking

---

## Strings (1 algorithm)

Algorithms for string matching and manipulation. Algorithms live under `src/algorithms/strings/<technique>/<algorithm>/`.

| Technique | Algorithm | Visualizer | Source Directory |
| ---------------- | ---------- | ------------------------------------ | ----------------------------------------------------- |
| Pattern Matching | KMP Search | Text row, pattern row, failure table | `src/algorithms/strings/pattern-matching/kmp-search/` |
## Strings (32 algorithms)

Algorithms for string matching, manipulation, and comparison. Algorithms live under `src/algorithms/strings/<technique>/<algorithm>/`.

### Pattern Matching (6)

| Technique | Algorithm | Visualizer | Source Directory |
| ---------------- | -------------------- | ------------------------------------------------ | --------------------------------------------------------------- |
| Pattern Matching | KMP Search | Text row, pattern row, failure table | `src/algorithms/strings/pattern-matching/kmp-search/` |
| Pattern Matching | Naive Pattern Search | Text row, pattern row, brute-force slide | `src/algorithms/strings/pattern-matching/naive-pattern-search/` |
| Pattern Matching | Rabin-Karp Search | Text row, pattern row, rolling hash display | `src/algorithms/strings/pattern-matching/rabin-karp-search/` |
| Pattern Matching | Boyer-Moore Search | Text row, pattern row, bad character table | `src/algorithms/strings/pattern-matching/boyer-moore-search/` |
| Pattern Matching | Z-Algorithm | Text row, pattern row, Z-array visualization | `src/algorithms/strings/pattern-matching/z-algorithm/` |
| Pattern Matching | Hamming Distance | Text row, pattern row, position-by-position diff | `src/algorithms/strings/pattern-matching/hamming-distance/` |

### Palindrome (3)

| Technique | Algorithm | Visualizer | Source Directory |
| ---------- | ----------------------------- | ------------------------------------------- | ----------------------------------------------------------------------- |
| Palindrome | Palindrome Check | Char row with L/R pointers | `src/algorithms/strings/palindrome/palindrome-check/` |
| Palindrome | Valid Palindrome | Char row with skip markers and L/R pointers | `src/algorithms/strings/palindrome/valid-palindrome/` |
| Palindrome | Longest Palindromic Substring | Char row with center expansion arcs | `src/algorithms/strings/palindrome/longest-palindromic-substring/` |

### Character Frequency (3)

| Technique | Algorithm | Visualizer | Source Directory |
| ------------------- | ---------------------------- | ------------------------------------------- | ----------------------------------------------------------------------------------- |
| Character Frequency | First Non-Repeating Character | String row with frequency histogram | `src/algorithms/strings/character-frequency/first-non-repeating-character/` |
| Character Frequency | Minimum Window Substring | String rows with sliding window bracket | `src/algorithms/strings/character-frequency/minimum-window-substring/` |
| Character Frequency | Character Frequency Sort | String row with frequency-sorted output | `src/algorithms/strings/character-frequency/character-frequency-sort/` |

### Transformation (7)

| Technique | Algorithm | Visualizer | Source Directory |
| -------------- | -------------------- | -------------------------------------------- | ---------------------------------------------------------------------- |
| Transformation | Reverse String | Input/output rows with swap pointers | `src/algorithms/strings/transformation/reverse-string/` |
| Transformation | Reverse Words | Input/output rows with word-level reversal | `src/algorithms/strings/transformation/reverse-words/` |
| Transformation | String Compression | Input row with run-length output building | `src/algorithms/strings/transformation/string-compression/` |
| Transformation | Run-Length Decoding | Input row with expanded output building | `src/algorithms/strings/transformation/run-length-decoding/` |
| Transformation | String to Integer | Input row with phase-based parsing display | `src/algorithms/strings/transformation/string-to-integer/` |
| Transformation | String Rotation Check | Input/output with concatenation visualization | `src/algorithms/strings/transformation/string-rotation-check/` |
| Transformation | Longest Common Prefix | Input display with vertical column scanning | `src/algorithms/strings/transformation/longest-common-prefix/` |

### Trie Operations (5)

| Technique | Algorithm | Visualizer | Source Directory |
| --------------- | -------------------- | ------------------------------------------- | ------------------------------------------------------------------- |
| Trie Operations | Trie Insert & Search | SVG trie tree with path highlighting | `src/algorithms/strings/trie-operations/trie-insert-search/` |
| Trie Operations | Trie Prefix Count | SVG trie tree with count annotations | `src/algorithms/strings/trie-operations/trie-prefix-count/` |
| Trie Operations | Longest Word in Trie | SVG trie tree with DFS path marking | `src/algorithms/strings/trie-operations/longest-word-in-trie/` |
| Trie Operations | Auto-Complete Trie | SVG trie tree with suggestion collection | `src/algorithms/strings/trie-operations/auto-complete-trie/` |
| Trie Operations | Aho-Corasick Search | SVG trie tree with failure links and matches | `src/algorithms/strings/trie-operations/aho-corasick-search/` |

### Edit Distance (8)

| Technique | Algorithm | Visualizer | Source Directory |
| ------------- | ---------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------- |
| Edit Distance | Levenshtein Distance | DP matrix with source/target headers | `src/algorithms/strings/edit-distance/levenshtein-distance/` |
| Edit Distance | Jaro-Winkler Similarity | DP matrix with match window visualization | `src/algorithms/strings/edit-distance/jaro-winkler-similarity/` |
| Edit Distance | Longest Common Subsequence | DP matrix with diagonal path tracing | `src/algorithms/strings/edit-distance/longest-common-subsequence/` |
| Edit Distance | Longest Common Substring | DP matrix with contiguous diagonal path | `src/algorithms/strings/edit-distance/longest-common-substring/` |
| Edit Distance | Longest Repeated Substring | DP matrix (self-comparison) | `src/algorithms/strings/edit-distance/longest-repeated-substring/` |
| Edit Distance | Suffix Array Construction | DP matrix with suffix comparison display | `src/algorithms/strings/edit-distance/suffix-array-construction/` |
| Edit Distance | Wildcard Matching | DP matrix with ?/* pattern matching | `src/algorithms/strings/edit-distance/wildcard-matching/` |
| Edit Distance | Regular Expression Matching | DP matrix with ./* regex matching | `src/algorithms/strings/edit-distance/regex-matching/` |

---

Expand Down
5 changes: 5 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ flowchart LR
E -- "grid" --> H["GridVisualizer"]
E -- "dp-table" --> I["DPTableVisualizer"]
E -- "tree / linked-list<br/>heap / stack-queue<br/>hash-map / string<br/>matrix / set" --> J["Other Visualizers"]
E -- "string-palindrome" --> K["PalindromeVisualizer"]
E -- "string-frequency" --> L["FrequencyVisualizer"]
E -- "string-transform" --> M["TransformVisualizer"]
E -- "string-trie" --> N["TrieVisualizer"]
E -- "string-distance" --> O["DistanceVisualizer"]
```

## Core Pattern
Expand Down
7 changes: 6 additions & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ export function generateMyAlgorithmSteps(input: number[]): ExecutionStep[] {
| Heaps | `HeapTracker` | `initialize`, `compare`, `swap`, `siftDown`, `complete` |
| Stacks & Queues | `StackQueueTracker` | `initialize`, `push`, `pop`, `check`, `complete` |
| Hash Maps | `HashMapTracker` | `initialize`, `insert`, `lookup`, `found`, `complete` |
| Strings | `StringTracker` | `initialize`, `compare`, `match`, `buildTable`, `complete` |
| Strings (pattern) | `StringTracker` | `initialize`, `compareChars`, `charMatch`, `charMismatch`, `shiftPattern`, `buildFailure`, `complete` |
| Strings (palindrome) | `PalindromeTracker` | `initialize`, `setPointers`, `compareChars`, `charsMatch`, `charsMismatch`, `expandCenter`, `markPalindrome`, `complete` |
| Strings (frequency) | `FrequencyTracker` | `initialize`, `addToFrequency`, `removeFromFrequency`, `expandWindow`, `shrinkWindow`, `checkAnagram`, `markSatisfied`, `complete` |
| Strings (transform) | `TransformTracker` | `initialize`, `readChar`, `writeChar`, `swapChars`, `advancePointers`, `setPhase`, `appendOutput`, `complete` |
| Strings (trie) | `TrieTracker` | `initialize`, `createNode`, `traverseEdge`, `insertChar`, `markEndOfWord`, `searchChar`, `matchFound`, `addSuggestion`, `complete` |
| Strings (distance) | `DistanceTracker` | `initialize`, `computeCell`, `fillBaseCase`, `compareChars`, `recordOperation`, `tracePath`, `updateResult`, `complete` |
| Matrices (traversal) | `MatrixTracker` | `initialize`, `visit`, `collect`, `updateBounds`, `complete` |
| Matrices (transform) | `MatrixTransformTracker` | `initialize`, `swapCells`, `markCell`, `zeroCell`, `flipCell`, `complete` |
| Matrices (search) | `MatrixSearchTracker` | `initialize`, `compareCell`, `markFound`, `eliminateRegion`, `visitCell`, `complete` |
Expand Down
2 changes: 1 addition & 1 deletion docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Triggers on all pull requests to `main`. Runs these jobs in parallel:
| Job | What It Does |
| ---------------------------- | ----------------------------------------------------------------------------------------------------- |
| **Type Check & Lint** | `npm run typecheck`, `npm run lint`, `npm run format:check` |
| **Unit Tests** | `npm run test` — sharded 8 ways; results aggregated under the **Unit Tests Status** required check |
| **Unit Tests** | `npm run test` — sharded 10 ways; results aggregated under the **Unit Tests Status** required check |
| **E2E Tests** | `npm run e2e` — sharded 12 ways (15-min timeout per shard); aggregated under the **E2E Status** check |
| **Storybook Build** | `npm run storybook:build` |
| **Visual Tests (Chromatic)** | Runs after Storybook build; requires `CHROMATIC_PROJECT_TOKEN` secret |
Expand Down
Loading
Loading