Solutions for selected FreeCodeCamp daily challenges and LeetCode problems, organized with tests, coverage and linter.
This repository contains solutions for code challenges and their unit tests. It's intended for practicing problem-solving and verifying solutions.
solutions/: Implementation files for each challenge (e.g.ai_detector.py,convert_list_item.py).tests/: Unit tests that validate the behavior of the corresponding functions insolutions/.requirements.txt: Python dependencies used for running tests and tooling.
- Python 3.14+ (developed and tested with 3.14)
- Install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtThis project requires the virtual environment to be active for every development action.
Always run:
source .venv/bin/activateInstall or remove a dependency
pip install <package_name>
pip uninstall <package_name>Update dependencies
# update specific package
pip install --upgrade <package_name>
# or upgrade all from requirements
pip install --upgrade -r requirements.txtFreeze current environment
# Save all installed packages and versions to requirements.txt
python -m pip freeze > requirements.txtchmod +x scripts/run_lint.sh
chmod +x scripts/generate_coverage.shRun the linter (We are using Flake8)
scripts/run_lint.shThe script will report errors, warnings and style issues in the terminal including information.
Run the test suite with unittest from the repository root:
python -m unittest discoverRun specific test file
python -m unittest tests.test_reverse_linked_listTo generate coverage report:
scripts/generate_coverage.shThe script will print output in the terminal and open UI coverage report in default browser
- Add new solutions under
solutions/and tests undertests/. - Keep functions small and pure where possible to simplify testing.
- Follow existing naming and project conventions.
Built for learning, experimentation, and clean problem-solving.