A simple Python script to sort unsolved CSES problems by popularity, helping you learn more effectively by recommending CSES Problem Set problems based on popularity (which correlates with difficulty and importance).
Reduce decision fatigue and avoid wasting time on obscure niche algorithms when you should be building fundamentals first. CSES lacks this essential sorting feature.
- Parse your CSES problem set progress
- Get top N most-solved problems you haven't completed yet
- Python 3.11+
- uv (recommended) or pip
# Clone the repository
git clone https://github.com/mcjmk/cses-learning-tool.git
cd cses-learning-tool
# Install dependencies
uv sync
# Activate the environment (optional, uv run handles this)
source .venv/bin/activate # On Windows: .venv\Scripts\activatepip install -r requirements.txt
# Note: You'll need to generate requirements.txt from pyproject.toml-
Get your CSES problem set HTML:
- Go to CSES Problem Set
- Log in
- Save the page as
data/index.html(Right-click → Save As → index.html)
-
Parse your data:
uv run python src/html_parser.py
This creates
data/cses.csvwith all problems and your progress.
uv run python src/show_top_tasks.pyThis shows the top 10 most-solved problems that you haven't completed yet, along with their URLs.
Example output:
Top 10 most-solved yet unsolved problems:
1. Apartments — 53476 solvers
https://cses.fi/problemset/task/1084
2. Concert Tickets — 48903 solvers
https://cses.fi/problemset/task/1091
...
Edit constants in src/show_top_tasks.py:
TOP_N = 10- Change number of recommendationsCSV_PATH = "data/cses.csv"- Change data location
cses-learning-tool/
├── src/
│ ├── html_parser.py # Parses CSES HTML → CSV
│ ├── show_top_tasks.py # Shows top unsolved problems
│ └── main.py # Placeholder for future features
├── data/
│ ├── index.html # Your CSES problem set page (YOU provide this)
│ └── cses.csv # Generated from index.html
├── pyproject.toml # Dependencies & config
└── README.md
# Install dev dependencies
uv sync --dev
# Run linter
uv run ruff check src/
# Run type checker
uv run pyright
# Install pre-commit hooks
uv run pre-commit install- Web scraping automation (no manual HTML saving)
- Progress visualization
This is an alpha-stage project, but contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
MIT License - see LICENSE file
- CSES Problem Set by Antti Laaksonen
Note: Alpha version, things will change