Repository navigation
reorganize by topic - #1
Merged
Merged
Conversation
73anthonyL
commented
Oct 22, 2026
Owner
- Move solutions into topic folders
- Add tests for every solution
- Run lint and tests in CI
- Rewrite README for the topic-based layout
Group solutions by topic, following the NeetCode roadmap, instead of by difficulty, and name each file after its problem number and LeetCode URL slug (e.g. easy/TwoSum.py -> solutions/arrays-and-hashing/0001_two_sum.py). This commit only renames files, so `git log --follow` keeps each solution's history. Content changes follow in separate commits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add pytest cases for all 32 solutions, using each problem's LeetCode examples plus a few edge cases (122 cases in total), with one test file per topic. Solution files stay exactly as submitted to LeetCode. tests/helpers.py runs each one with the names LeetCode provides without imports (List, Optional, deque, ListNode, TreeNode, ...), and finds it by problem number so tests keep working if a problem moves to another topic. It also builds linked lists (including cycles) and trees from LeetCode's input format. Also add pyproject.toml (pytest and ruff settings, with ruff skipping solutions/), requirements-dev.txt, and a Python .gitignore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run `ruff check`, `ruff format --check`, and pytest on pushes to main and on pull requests, on Python 3.10 (the minimum the solutions' type-hint syntax supports) and 3.14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reframe the README around topic-based DSA practice following the NeetCode roadmap, with a table per topic linking each problem, its solution, and its time and space complexity. The old table had already drifted: Assign Cookies (#455) was missing. tests/test_repository.py now fails CI if a solution is missing from the README, a README row's link doesn't match its file name, or a solution has no test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.