Leetsolv
A spaced repetition CLI for DSA, powered by a custom SM-2 algorithm for deliberate practice.
Install / Use
/learn @eannchen/LeetsolvREADME
LeetSolv
</div>LeetSolv is a CLI tool for Data Structures and Algorithms (DSA) problem revision with spaced repetition. It supports problems from LeetCode and HackerRank. Powered by a customized SuperMemo 2 algorithm that incorporates familiarity, importance, and reasoning to move beyond rote memorization.

Table of Contents
Installation
Scoop (Windows)
scoop bucket add extras
scoop install extras/leetsolv
Homebrew (macOS/Linux)
brew install leetsolv
Shell Script (macOS/Linux)
curl -fsSL https://raw.githubusercontent.com/eannchen/leetsolv/main/install.sh | bash
To uninstall:
curl -fsSL https://raw.githubusercontent.com/eannchen/leetsolv/main/install.sh | bash -s -- --uninstall
Usage
LeetSolv can be run interactively or by passing commands directly from your terminal.
# Start interactive mode
leetsolv
# Or run commands directly
leetsolv add https://leetcode.com/problems/two-sum
leetsolv status
# Get help
leetsolv help
View Full Usage Guide (USAGE.md)
Review Scheduling System
Adaptive SM-2 Algorithm
Unlike standard SM-2 (used by Anki), LeetSolv adds importance and reasoning factors—designed for DSA practice, not flashcard memorization. Familiarity (5 levels), Importance (4 levels), and Reasoning (3 levels) determine your next review date. Randomization prevents bunching reviews on the same days.
graph TD
A[Add a DSA Problem to LeetSolv] --> B[Algorithm Applies Adaptations]
B --> C[Familiarity Scale]
B --> D[Importance Scale]
B --> E[Reasoning Scale]
B --> F[Due Penalty, optional]
B --> G[Randomization, optional]
H[Algorithm Calculates with SM-2 Ease Factor]
C --> H
D --> H
E --> H
F --> H
G --> H
H --> I[Determine Next Review]
Due Priority Scoring
Due reviews can accumulate over time. LeetSolv ranks them by priority score so you can focus on what matters most.
Default formula: (1.5×Importance) + (0.5×Overdue Days) + (3.0×Familiarity) + (-1.5×Review Count) + (-1.0×Ease Factor)

Interval Growing Curve
Review intervals expand based on importance, familiarity, and reasoning. Higher importance = shorter intervals, more frequent reviews.

Problem Management
Functionalities
- CRUD + Undo: Create, view, update, delete problems. Undo your last action.
- Trie-Based Search: Fast filtering by keyword, importance, familiarity.
- Quick Views: Summary of due/upcoming problems with paginated listing.
- Interactive & Batch Modes: Run interactively or pass commands directly.
- Intuitive Commands: Familiar aliases (
ls,rm), color-coded output.
Data Privacy & Safety
- No Data Collection: LeetSolv does not upload user data to the internet.
- Atomic Writes: All writes use temp file + rename for data consistency.
Configuration
Customize via environment variables or JSON config. See CONFIGURATION.md for all options.
FAQ
Q: Why use LeetSolv instead of an Anki deck?
A: Anki is great for memorizing facts, but DSA requires deeper practice. LeetSolv's SM-2 algorithm uses reasoning, familiarity, and importance to schedule deliberate problem-solving—not rote recall.
Q: Should I add all my previously solved problems?
A: No. Only add problems you want to revisit. The algorithm uses the add date for scheduling—bulk-adding creates unrealistic schedules. For old problems, re-solve first, then add.
Q: After a period of use, I accumulated too many due problems.
A: SM-2 accumulates dues if you skip days. Use Due Priority Scoring to focus on high-priority problems first. Remove mastered problems—the goal is active practice, not tracking everything.
Q: Why zero third-party dependencies?
A: LeetSolv is implemented in pure Go for full control over all implementations—no external libraries. See MOTIVATION.md for the design philosophy.
Open an issue for questions or suggestions.
LeetSolv - A spaced repetition CLI for DSA, powered by a custom SM-2 algorithm for deliberate practice.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
