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.0.2.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.0.2-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsap_cli-1.0.2.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.0.2.tar.gz
Algorithm Hash digest
SHA256 7f57f6bedd6966a6332c2e1c4dc92763350b62993b66cbe1b7716ce1c8ad7ba9
MD5 cf1195f9b7506737af21a5326f7833f9
BLAKE2b-256 2cfc0feb303cc8ed471d668459d0a4be969bcf7d28327e2dcc611968b8bc19be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsap_cli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c5197194651d6d643e866cb181f4671a50e915c629663151425536e9e211386
MD5 8084757405efbeca1e30a8686be7ac0f
BLAKE2b-256 7157350b4cca8bd45ef5894f6a9c554192f26d1dd67fbedfdbf215aeb15aa85f

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