Skip to content

Latest commit

 

History

History
79 lines (58 loc) · 2.71 KB

CONTRIBUTING.md

File metadata and controls

79 lines (58 loc) · 2.71 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 reorganise
    git pull upstream reorganise
  3. Create a new branch (off the reorganise 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 reorganise
  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 reorganise branch.

Code of Conduct

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