Skip to content

Latest commit

 

History

History
95 lines (66 loc) · 2.78 KB

CONTRIBUTING.md

File metadata and controls

95 lines (66 loc) · 2.78 KB

Contributing Guidelines

Contents

General guidelines

  • 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.

C++ coding guidelines

If you are contributing C++ code to this repo, make sure to read the C++ Coding Guidelines.

Pull requests

Follow the steps below to contribute to the project:

  1. 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
  2. If you cloned a while ago, get the latest changes from upstream:

    git checkout master
    git pull upstream master
  3. Create a new branch (from the master branch) to contain your code for a specific algorithm or data structure:

    git checkout -b <branch-name>
  4. Commit your changes in logical chunks. Use Git's interactive rebase feature to tidy up your commits before making them public.

  5. Locally merge (or rebase) the upstream development branch into your branch:

    git pull [--rebase] upstream master
  6. Push your branch up to your fork:

    git push origin <branch-name>
  7. Open a pull request with a clear title and description against the master branch.

Code of Conduct

This project has a Code of Conduct. Please follow it in all your interactions with the project.