Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Reference Project

Personal Python 3.13 workspace for coding challenges, algorithms, data structures, and optimization problems.

Structure

algorithms/       # sorting, searching, graph, dynamic programming, etc.
data_structures/  # trees, heaps, tries, graphs, etc.
optimization/     # performance-focused problems and benchmarks
challenges/       # LeetCode, HackerRank, and general puzzles
_template/        # copy these when starting a new problem

Setup

# Activate the virtual environment
source venv/bin/activate

# Install dependencies (first time only)
pip install pytest ruff

Adding a New Problem

  1. Copy template files to the right category:
    cp _template/problem_template.py algorithms/binary_search.py
    cp _template/test_template.py algorithms/test_binary_search.py
  2. Fix the import in the test file: from algorithms.binary_search import solve
  3. Fill in the problem docstring, implement solve(), and add test cases

Running

# Run a problem directly
python algorithms/binary_search.py

# Run one problem's tests
pytest algorithms/test_binary_search.py

# Run all tests
pytest

# Lint and format
ruff check .
ruff format .

About

This is a scratch pad for python coding

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages