This repository is a hub for algorithmic exercises and coding challenges from various sources (Rendezvous with cassidoo / HackerRank / Codewars) to sharpen my skills in Python, Go, Typescript and other side-projects languages. All exercises problems are written in comments at the beginning of the corresponding script.
- Each language has its own directory (
Python
,Go
,TypeScript
,Solidity
). - Within the
Go
directory, every exercise is contained in its own subdirectory, each withgo.mod
,main.go
andmain_test.go
files. - Other languages are organized similarly, following the best practices of each language.
How many opened doors ? | python | |||
Anti-Divisor | python | go | ||
Combine strings | python | |||
Zero run replacer | python | |||
Max Subarray | python | typescript | solidity | |
Swap Pairs | python | go | typescript | solidity |
Decode Morse Code | python | go | typescript | |
Sum every other digit | python | go | typescript | |
Get A1 Reference number | python | go | ||
Are two strings isomorphic ? | python | go | ||
Ceaser Cipher | go | |||
Mars exploration | go | |||
Subsequence string search | go | typescript | ||
Diagonal difference | go | |||
Min-max sum | go | |||
Highest candles | python | go | ||
Time conversion | go | typescript |
TBD (librairies, requirements.txt)
-
Run scripts :
cd algorithmic-playground/Python/scripts python <name_of_script>.py
-
Run linter :
cd algorithmic-playground/Python/ black .
-
Run tests :
cd algorithmic-playground/Python/ pytest
-
Run scripts :
cd algorithmic-playground/Go/<name_of_folder> go run main.go
-
Run linter :
cd algorithmic-playground/Go/ golint ./...
-
Run tests :
cd algorithmic-playground/Go/<name_of_folder> go test
-
Run scripts :
cd algorithmic-playground/TypeScript/src ts-node <name_of_script>
-
Run linter :
cd algorithmic-playground/TypeScript/ ./node_modules/.bin/eslint .
-
Run tests :
cd algorithmic-playground/TypeScript/tests npx jest
A Continuous Integration (CI) pipeline has been setup using GitHub Actions to ensure code quality, consistency, and successful builds for both our Go and TypeScript code.
- Linting on Push and Pull Requests: Whenever code is pushed or a pull request is made, the CI pipeline automatically lints the Go code to ensure coding standards are met.
- Automated Testing: Along with linting, the pipeline runs tests for the Go code to validate functionality.
- Tools Used: I use
golint
for linting and Go's built-in testing framework for running tests. - GitHub Actions Workflow: The linting process is defined in the
.github/workflows/go-ci.yml
file, utilizing GitHub Actions to automatically execute linting and testing on the latest version of Go.
- Linting on Push and Pull Requests: Whenever code is pushed or a pull request is made, the CI pipeline automatically lints the Python code to ensure coding standards are met.
- Automated Testing: Along with linting, the pipeline runs tests for the Python code to validate functionality.
- Tools Used: I use
black
for linting andpytest
for running tests. - GitHub Actions Workflow: The CI process is defined in the
.github/workflows/python-ci.yml
file, utilizing GitHub Actions to automatically execute linting and testing on the latest version of Go.
- Build on Push and Pull Requests: The CI pipeline is configured to automatically build TypeScript files whenever changes are pushed or a pull request is made to the TypeScript directory.
- Node.js Setup: The workflow sets up a Node.js environment to manage dependencies and run the build scripts.
- Build Script: TypeScript files are compiled using the TypeScript compiler configured in the package.json file.
- Workflow Details: The TypeScript build process is defined in the
.github/workflows/typescript-ci.yml
file. It ensures that TypeScript code is compiled successfully, preventing runtime errors due to compilation issues.