Deterministic CLI orchestrator for sequential LeetCode progress with state management, planning, and browser automation.
This repository contains my solutions to LeetCode problems, along with a hardened planner/runner (manager.py) that automates the solve-track-submit workflow.
Most leetcode repos are just solution dumps. This one has:
- Deterministic planning — the manager scans the repo, recomputes the contiguous solved prefix, and plans exactly which problem to solve next
- Lock-file concurrency — prevents overlapping automation runs
- State persistence — JSON-based tracking of sequential progress + daily challenges
- Browser automation — optional CDP-based submission via Chrome DevTools Protocol
- Dry-run mode — preview the plan without writing state
Problems solved: 68+ and counting
Solutions are in Python (primary) with select problems in JavaScript. Each file follows the naming convention NNNN_slug.py.
# See what the planner would do (no state changes)
python3 manager.py --dry-run
# Plan with today's daily challenge
python3 manager.py --daily-id 3651 --daily-slug minimum-cost-walk-in-weighted-graph
# Mark a daily as solved
python3 manager.py --daily-id 3651 --mark-solved 3651
# Submit via browser automation (requires Chrome CDP)
python3 manager.py --execute-target-id 41 --solution-file /tmp/0041.py --cdp-url http://127.0.0.1:56278- Scans root-level
NNNN_slug.pyfiles every run - Recomputes the contiguous solved prefix (e.g., 1–68 = prefix of 68)
- Plans
1 sequential + 1 dailywhen an unsolved daily challenge is provided - Plans
2 sequentialwhen the daily is already solved - Treats daily challenges that match sequential targets as dual-purpose
Each solution includes:
- Problem number and title in the filename
- Approach explanation in comments
- Time and space complexity analysis
- Clean, readable code (no competitive-programming shortcuts)
| Component | Technology |
|---|---|
| Language | Python 3 (stdlib only for manager) |
| Concurrency | File-based locking (fcntl) |
| State | JSON persistence |
| Browser | Chrome DevTools Protocol (optional) |
Found a bug in a solution or have a cleaner approach? PRs welcome! See CONTRIBUTING.md.
MIT — Nishant Sarang