Repository for algorithms, problems and data structures that we have used. This serves as a reference for everyone interested. For any suggestion on algorithm, problem or data structure, just open an issue with question label.
This repo contains questions from LeetCode (most of them), HackerRank, CodeSignal and LintCode. We suggest you try their platform so you can get new problems and articles about algorithms.
The documentation for this project can be found at https://walterjgsp.github.io/algorithms/
The problems list can be found at Problems
The following libraries are used in the project and are necessary to install if you want to enjoy all the features in this project (testing):
- Gradle: build tool for Kotlin.
All the C++ code were done using the C++14 version. To compile use the following command:
g++ -std=c++20 <INPUT_FILE_NAME> -o <OUTPUT_FILE_NAME>
And to run the code:
./<OUTPUT_FILE_NAME>
If you are running on a Mac one of the options for the stdc++ library to work it's to add it on XCode. To do that first create the folder bits in the following path: /Library/Developer/CommandLineTools/usr/include/c++/v1
Then copy the file stdc++.h inside the folder C++/frameworks/ to the folder bits.
First is necessary to install Kotlin command line kotlinc
To compile use the following command:
kotlinc <INPUT_FILE_NAME> -include-runtime -d <OUTPUT_FILE_NAME>.jar
And to run the code:
java -jar <OUTPUT_FILE_NAME>
All the Java code were done using the JDK 11 version. Compile using the following command:
javac <INPUT_FILE_NAME>
And to run the code:
java Main
All Python code was done using Python 3.7 version. Run the code using the following command:
python3 <INPUT_FILE_NAME>
Services that i decided to use in this repository so i could test a more professional way of working:
Add 0 in front of each filename:
rename 's/\d+/sprintf("%04d", $&)/e' *.cpp