Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MohamedAbdElgni/algorithms-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm Problems and Solutions

This repository contains solutions to various algorithm problems with detailed documentation and tests.

Project Structure

algorithms-python/
├── docs/              # Documentation for each problem
│   └── problem-name.md
├── src/               # Source code organized by categories
│   ├── dynamic/       # Dynamic programming problems
│   ├── graphs/        # Graph-related problems
│   ├── math/          # Mathematical problems
│   ├── searching/     # Searching algorithms
│   ├── sorting/       # Sorting algorithms
│   └── strings/       # String manipulation problems
└── tests/             # Test cases for each solution

Documentation Format

Each problem includes:

  1. A markdown file in the docs/ directory explaining:

    • Problem description
    • Algorithm design
    • Input/Output specifications
    • Constraints
    • Solution approach
    • Time and space complexity
  2. Implementation in the appropriate category directory under src/

  3. Test cases in the tests/ directory

Getting Started

  1. Create a virtual environment:

    uv venv
    source .venv/bin/activate
  2. Install dependencies listed in pyproject.toml:

    uv sync
  3. Run tests:

    pytest tests/
  4. Format and lint code:

    black src/ tests/
    isort src/ tests/

Contributing

When adding a new problem solution:

  1. Create documentation in docs/
  2. Implement solution in appropriate category in src/
  3. Add comprehensive tests in tests/
  4. Ensure all tests pass before submitting

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages