LeetCode solution browser with code viewer and approach notes.
- Problem Browser — filter by difficulty and tags
- Code Viewer — Python solutions with one-click copy
- Approach Notes — step-by-step reasoning with optimization tips
- Problem Navigation — quick prev/next switching
- Related Problems — knowledge graph connecting related topics
- Agent Workflow — Agent skill (
leetcode-sync) to auto-update metadata when adding new solutions
git clone https://github.com/kairoswong/leetcode.git
cd leetcode
# Open site/index.html directly (no server needed)Optionally rebuild the data index:
python scripts/generate-index.pyleetcode/
├── skills/
│ └── leetcode-sync/
│ └── SKILL.md # Agent skill
├── site/ # Static site
│ ├── index.html # Problem browser
│ ├── solution-detail.html # Detail page (code + approach)
│ ├── data/ # JSON data files
│ └── scripts/
├── solutions/ # Python solution files
├── scripts/ # Build & utility scripts
├── assets/
│ └── preview/ # Screenshots for README
└── readme.md
An agent skill automates metadata updates when adding solutions.
- Add a
.pyfile insolutions/ - Run in any agent (Copilot, Claude Code, Codex):
@leetcode-sync Add solution 15 - The agent reads your code, analyzes it to infer difficulty, complexity, tags, then updates all JSON data and rebuilds the site index.
| File | Content |
|---|---|
site/data/difficulties.json |
Problem difficulty (easy / medium / hard) |
site/data/complexities.json |
Time & space complexity |
site/data/descriptions.json |
One-sentence problem description |
site/data/approaches.json |
Solution approach / algorithm pattern |
site/data/insights.json |
Key insight behind the solution |
site/data/tags.json |
Topic tags for filtering |
BSD 3-Clause License — see LICENSE.

