Skip to main content

CLI tool for practicing data structures and algorithms using spaced repetition.

Project description

Data Structures and Algorithms Practice (DSAP)

CI codecov PyPI PyPI downloads Python Versions License

DSAP is a terminal-first CLI that schedules coding interview problems using the SM-2 spaced repetition algorithm,
helping you retain patterns long-term instead of forgetting them after solving once.

dsap-cli Demo

Why DSAP?

Most developers preparing for technical interviews solve algorithm problems once and never revisit them.

As a result, they forget patterns they previously learned.

DSAP solves this by scheduling problems using spaced repetition, a learning technique proven to improve
long-term memory.

Benefits:

  • Retain algorithm patterns long-term
  • Structured daily practice
  • Automatic scheduling of reviews
  • Focus on problems you’re about to forget

Instead of guessing what to practice next, DSAP tells you exactly what to review.


Installation

# Recommended
uv tool install dsap-cli

# Alternatives
pipx install dsap-cli
pip install dsap-cli

Verify installation:

dsap --version

Quick Start

# Load problems and set focus
dsap load blind75
dsap config preferred_set blind75

# Start practicing
dsap next

For the full workflow see:

USER_GUIDE.md

Example Session

$ dsap next

Next Problem
Two Sum (Easy)

Category: Arrays
Set: Blind 75

Open problem in browser? [y/N]

After solving, rate your recall:

5 - Perfect
4 - Good
3 - Hard
2 - Incorrect but remembered idea
1 - Incorrect
0 - Complete blackout

DSAP then schedules the next review automatically.


Commands

Command Description
dsap next Get next recommended problem
dsap review Review due problems in a session
dsap list List problems with filters
dsap stats View progress and statistics
dsap load Load curated problem sets
dsap config Manage configuration
dsap reset Reset problems and/or progress
dsap add Add a custom problem

Examples

# Filter by problem set
dsap next --set blind75
dsap review --set neetcode150

# Filter by difficulty
dsap next --difficulty Easy
dsap list --difficulty Hard

# Filter by category
dsap list --category "Dynamic Programming"

# Other options
dsap review --limit 5
dsap next --new-only
dsap list --due

# Reset progress
dsap reset --progress

# Reset a specific set
dsap reset --set blind75 --all

Problem Sets

Set Problems Description
blind75 75 Core interview essentials
neetcode150 150 Comprehensive curriculum
grind75 75 Flexible study roadmap
dsap load --list
dsap load blind75
dsap load ./custom.yaml

Configuration

dsap config --list
dsap config preferred_set blind75
dsap config daily_goal 5
dsap config preferred_difficulty Medium
dsap config auto_open_browser false
dsap config --reset
Setting Default Description
preferred_set None Default problem set
daily_goal 5 Target problems per day
preferred_difficulty None Filter by difficulty
show_hints true Show problem hints
auto_open_browser true Open problems in browser

How It Works

DSAP implements the SM-2 (SuperMemo 2) spaced repetition algorithm.

After solving each problem, rate your recall from 0–5.

Rating Meaning Effect
5 Perfect Interval grows
4 Good Interval grows
3 Hard Interval grows slowly
0-2 Forgot Interval resets

Typical interval progression:

1 day → 6 days → 15 days → 38 days → 95 days

After several successful reviews, problems reappear only every few months.


Data Storage

DSAP stores all data locally:

~/.dsap/
├── dsap.db
└── config.json

To completely uninstall:

uv tool uninstall dsap-cli
rm -rf ~/.dsap

Development

git clone https://github.com/juma-paul/dsap-cli.git
cd dsap-cli

uv sync --all-extras
uv run pytest

Changelog

See the full release history in:

CHANGELOG.md


License

This project is open source and available under the MIT License.


Built with Python, Click, Rich, Pydantic, and SQLite.

If you found this helpful, consider giving it a star

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dsap_cli-1.1.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dsap_cli-1.1.0-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

Details for the file dsap_cli-1.1.0.tar.gz.

File metadata

  • Download URL: dsap_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dsap_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 027628874075d879bb1881758996e51c56d72d2b4d478ce7a95e210639baa20e
MD5 7319e1fb022e5f8b7982aaf4b4501b45
BLAKE2b-256 744d661577be658026122e150716a80e2561b31d4587469fdc11c638409df8e5

See more details on using hashes here.

File details

Details for the file dsap_cli-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: dsap_cli-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dsap_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d433c2b7e82feae858dc1386972e2c465d1f70b852db8b78807a29ac700abfc7
MD5 025f806bd7c2e2a912f8f8401f9ee0dc
BLAKE2b-256 0643fe0ed4e9bbfb6dd8345b3e59ef675e206f9003dfefbbf5d536889f05dc18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page