-
When contributing to this repository, please first inform or discuss the change(s) you wish to make via an issue. This helps in letting others know what you're working on.
-
For each algorithm, mention its time complexity and space complexity in the "description comment" of its implementation. In case the average-case and worst-case complexities are different, mention both of them.
The format for the "description comment" (which is written at the beginning) should be:
<Name of algorithm> ------------------- <Brief description> Time complexity --------------- O(...), where <description of variable(s)> Space complexity ---------------- O(...), where <description of variable(s)>
-
Before you push your changes to GitHub, make sure that your code compiles and runs without any errors or warnings.
If you are contributing C++ code to this repo, make sure to read the C++ Coding Guidelines.
Follow the steps below to contribute to the project:
-
Fork the repo, clone your fork, and configure the remotes:
# Clone your fork of the repo into the current directory git clone https://github.com/<your-username>/Algos.git # Navigate to the newly cloned directory cd Algos # Assign the original repo to a remote called "upstream" git remote add upstream https://github.com/faheel/Algos.git
-
If you cloned a while ago, get the latest changes from upstream:
git checkout reorganise git pull upstream reorganise
-
Create a new branch (off the
reorganise
branch) to contain your code for a specific algorithm or data structure:git checkout -b <branch-name>
-
Commit your changes in logical chunks. Use Git's interactive rebase feature to tidy up your commits before making them public.
-
Locally merge (or rebase) the upstream development branch into your branch:
git pull [--rebase] upstream reorganise
-
Push your branch up to your fork:
git push origin <branch-name>
-
Open a pull request with a clear title and description against the
reorganise
branch.
This project has a Code of Conduct. Please follow it in all your interactions with the project.