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 Version

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsap_cli-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 22c5ff108b1e84e07c1d2418cc34a6daa25ce3437071c2f30c1229c91f4594a1
MD5 16da038ae2f791b7b95c65b20e44782e
BLAKE2b-256 056f7e8a769b38db3ee89b1a4418ceb64ebb43a3550a3497117ac5e638d138fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsap_cli-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 18b391227614941a728cc4ca83f35f5a1781993dc387fbd6bc4a147a7f52355b
MD5 aab92a6e81c6214e2749cac72354b4a8
BLAKE2b-256 1c84642bfc852c77c57f1feafc4c89f834eeb4e831aedb705598ef210d3293d6

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