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.4.tar.gz (2.4 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.4-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsap_cli-1.1.4.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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.4.tar.gz
Algorithm Hash digest
SHA256 dc569c090a7c82cac0355db671d7f0a028a449d80c6233f9b4cec4ed7becbd2d
MD5 40bc0f4c81b600515da62146e8c8aa81
BLAKE2b-256 b9c01823ec321ff5f73c23b11eaa9d7784535c9a0ab3a1173e7ff327d8da3b27

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsap_cli-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ae80dfbeb4516e1d6aa8b0be4c64b982b13ec26f9a10c7cdc75e35c991a589b2
MD5 8a3382ced0c1aecc3b165f749966e0eb
BLAKE2b-256 ff0e616e46647316cb441e5a66a126c4532376f02073fbac4fdee357c58af7d7

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