feat(trees): expand from 1 to 87 algorithms with 5 new tracker variants - #34
Merged
Conversation
Add 86 new tree algorithms across 6 technique subcategories: - traversal (12 new): inorder/preorder/postorder iterative, level-order, reverse-level-order, zigzag, vertical-order, boundary, diagonal, morris - bst-operations (21 new): search, insert, delete, validation, kth-smallest, LCA, from-sorted-array, iterator, floor-ceil, range-sum, to-greater-tree, recover-swapped — each with recursive and iterative variants - properties (21 new): max/min depth, diameter, balanced, symmetric, count-complete, path-sum, max-path-sum, left-leaves, root-to-leaf paths, tilt, cousins, root-to-leaf numbers — with iterative variants - construction (6 new): build from preorder+inorder, postorder+inorder, serialize-deserialize, level-order — with iterative variants - manipulation (16 new): invert, flatten, right-side-view, same-tree, merge, subtree-of, LCA (general), delete-leaves, distribute-coins, flip-equivalent - advanced (10 new): AVL rotation, red-black insert, segment tree range sum/min, binary indexed tree, tree-to-DLL, pruning, n-ary traversal, huffman coding, expression tree evaluation Infrastructure: extend TreeNodeState (4→8), TreeVisualState (9 new fields), TreeNode (childrenIds for n-ary), 26 new StepTypes, TreeVisualizer updates for n-ary edges, dual-tree rendering, and operation labels. CI: increase vitest shards 10→12, E2E shards 14→16 for 453 total algorithms.
- Fix total algorithm count to 452 across README, catalog, testing - Fix CI shard counts: vitest 8→12, E2E 12→16 in testing.md - Fix algorithms-catalog.md category counts for searching (18), linked-lists (8), stacks-queues (28) - Add TreeNodeState entry to glossary with all 8 states - Add tree-specific debugging section to debugging.md - Fix VisualState kind count 12→17, add 5 missing string kinds - Add TreeNodeState→CSS token mapping to design-system.md - Update architecture.md: trees annotation, input editors table, input editor file count 6→10 - Fix tracker subclass count 14→34 in glossary - Fix session hooks count in claude-system.md and architecture.md
…te ID Storybook resolves both matrices/diagonal-traversal and trees/diagonal-traversal to the same story ID. Rename the tree variant to TreeDiagonalTraversalPipeline with a unique title to prevent the collision.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Algorithm Breakdown
Test plan
npm run lint— 0 errorsnpm run format— cleannpm run typecheck— 0 errorsnpm test— 910 files, 8020 tests passed