Skip to content

omergamliel3/code-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code-challenges

code-challenges CI Python Coverage

Solutions for selected FreeCodeCamp daily challenges and LeetCode problems, organized with tests, coverage and linter.

📌 Project Overview

This repository contains solutions for code challenges and their unit tests. It's intended for practicing problem-solving and verifying solutions.

🗂 Repository Structure

  • 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 in solutions/.
  • requirements.txt: Python dependencies used for running tests and tooling.

⚙️ Requirements

  • Python 3.14+ (developed and tested with 3.14)
  • Install dependencies:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

❕ IMPORTANT — Activate Virtual Environment

This project requires the virtual environment to be active for every development action.

Always run:

source .venv/bin/activate

📦 Managing Dependencies

Install 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.txt

Freeze current environment

# Save all installed packages and versions to requirements.txt
python -m pip freeze > requirements.txt

Make scripts executable (one-time)

chmod +x scripts/run_lint.sh
chmod +x scripts/generate_coverage.sh

🧹 Running Linter

Run the linter (We are using Flake8)

scripts/run_lint.sh

The script will report errors, warnings and style issues in the terminal including information.

🧪 Running Tests

Run the test suite with unittest from the repository root:

python -m unittest discover

Run specific test file

python -m unittest tests.test_reverse_linked_list

To generate coverage report:

scripts/generate_coverage.sh

The script will print output in the terminal and open UI coverage report in default browser

🤝 Contributing

  • Add new solutions under solutions/ and tests under tests/.
  • Keep functions small and pure where possible to simplify testing.
  • Follow existing naming and project conventions.

Built for learning, experimentation, and clean problem-solving.

About

Code challenges solutions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published