2020-07-05 15:48:51 +02:00
< h1 align = "center" > programming-challenges< / h1 >
< p align = "center" >
< strong > Programming exercises and challenges to improve your algorithmic logic.< / strong >
< / p >
< p align = "center" >
2021-06-30 11:35:41 +02:00
< a href = "./CONTRIBUTING.md" > < img src = "https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat" / > < / a >
2020-09-12 23:29:46 +02:00
< a href = "./LICENSE" > < img src = "https://img.shields.io/badge/licence-MIT-blue.svg" alt = "Licence MIT" / > < / a >
2021-06-30 11:35:41 +02:00
< a href = "./CODE_OF_CONDUCT.md" > < img src = "https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt = "Contributor Covenant" / > < / a >
< br / >
2023-07-02 17:28:54 +02:00
< a href = "https://github.com/theoludwig/programming-challenges/actions/workflows/cli.yml" > < img src = "https://github.com/theoludwig/programming-challenges/actions/workflows/cli.yml/badge.svg?branch=master" / > < / a >
< a href = "https://github.com/theoludwig/programming-challenges/actions/workflows/challenges.yml" > < img src = "https://github.com/theoludwig/programming-challenges/actions/workflows/challenges.yml/badge.svg?branch=master" / > < / a >
2021-06-30 11:35:41 +02:00
< a href = "https://conventionalcommits.org" > < img src = "https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg" alt = "Conventional Commits" / > < / a >
2021-12-07 12:19:00 +01:00
< br / >
2023-07-02 17:28:54 +02:00
< a href = "https://gitpod.io/#https://github.com/theoludwig/programming-challenges" > < img src = "https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" alt = "Gitpod ready-to-code" / > < / a >
2020-07-05 15:48:51 +02:00
< br / > < br / >
2021-06-09 20:31:45 +02:00
< img src = "./logo.png" width = "120" alt = "programming-challenges Logo" / >
2020-07-05 15:48:51 +02:00
< / p >
## 📜 About
**programming-challenges** brings together lots of programming exercises and challenges to improve your algorithmic logic.
Each challenge has its **solutions** , its **instructions** and **input/output examples** so you can try to solve them on your own. See [challenges ](./challenges ) folder.
2023-07-20 22:00:11 +02:00
[🧠 Programming Challenges - Blog Post ](https://theoludwig.fr/blog/programming-challenges/ ).
2023-07-02 17:39:48 +02:00
2021-06-09 20:31:45 +02:00
### ✅ Programming languages available
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
- [C/C++ (gcc) ](https://gcc.gnu.org/ )
2021-09-05 11:20:19 +02:00
- [C# (Mono) ](https://www.mono-project.com/ )
2021-06-09 20:31:45 +02:00
- [Dart ](https://dart.dev/ )
2021-06-24 22:10:08 +02:00
- [Java (OpenJDK) ](https://openjdk.java.net/ )
2021-06-09 20:31:45 +02:00
- [JavaScript/TypeScript (Node.js) ](https://nodejs.org/ )
2023-08-02 17:26:47 +02:00
- [Python (PyPy) ](https://www.pypy.org/ )
2021-06-09 20:31:45 +02:00
- [Rust ](https://www.rust-lang.org/ )
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
## 🚀 Getting Started
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
### ☁️ Try with a Single-Click
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
Gitpod will automatically setup an environment for you.
2020-07-05 15:48:51 +02:00
2023-07-02 17:28:54 +02:00
[![Open in Gitpod ](https://gitpod.io/button/open-in-gitpod.svg )](https://gitpod.io/#https://github.com/theoludwig/programming-challenges)
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
### Locally
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
#### Prerequisites
2020-07-05 15:48:51 +02:00
2022-12-30 00:55:21 +01:00
- [Node.js ](https://nodejs.org/ ) >= 18.0.0
2023-05-13 18:48:23 +02:00
- [npm ](https://npmjs.com/ ) >= 9.0.0
2021-06-09 20:31:45 +02:00
- [Docker ](https://www.docker.com/ )
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
#### Installation
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
```sh
# Clone the repository
2023-07-02 17:28:54 +02:00
git clone git@github.com:theoludwig/programming-challenges.git
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
# Go to the project root
cd programming-challenges
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
# Install dependencies
npm install
2020-07-05 15:48:51 +02:00
2021-06-30 15:36:19 +02:00
# Build the Command Line Interface (CLI)
npm run build
2021-06-09 20:31:45 +02:00
# Install the `programming-challenges` Command Line Interface (CLI)
npm install --global
```
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
### Usage
```sh
# Discover all the commands availables
programming-challenges --help
2021-09-05 11:20:19 +02:00
# Generate a new challenge
2022-08-30 15:48:07 +02:00
programming-challenges generate challenge --github-user="YourGitHubName" --challenge="hello-world"
2021-09-05 11:20:19 +02:00
# Generate a new solution
2022-08-30 15:48:07 +02:00
programming-challenges generate solution --github-user="YourGitHubName" --challenge="hello-world" --solution="function" --language="python"
2021-09-05 11:20:19 +02:00
# Test a solution
2022-08-30 15:48:07 +02:00
programming-challenges run test --challenge="hello-world" --solution="function" --language="python"
# Run a solution with specific `input.txt` file
programming-challenges run solution --challenge="hello-world" --solution="function" --language="python" --input-path="./challenges/hello-world/test/1/input.txt" --output
2023-08-02 17:26:47 +02:00
# Search for a challenge not yet solved in a specific programming language
programming-challenges search --language="rust"
2021-06-09 20:31:45 +02:00
```
2020-07-05 15:48:51 +02:00
## 💡 Contributing
2021-06-09 20:31:45 +02:00
Anyone can help to improve the project, submit a challenge, a solution or even correct a simple spelling mistake.
2020-07-05 15:48:51 +02:00
2021-06-09 20:31:45 +02:00
The steps to contribute can be found in the [CONTRIBUTING.md ](./CONTRIBUTING.md ) file.
2020-07-05 15:48:51 +02:00
## 📄 License
[MIT ](./LICENSE )