chaudharypraveen98 / Competitive-Programming

It contains questions from various online and offline platforms such as Hackerrank, Coding Ninjas, Codeforces, Leetcode, Codeforces etc
5 stars 7 forks source link
c cpp geeksforgeeks geeksforgeeks-solutions hackerrank hackerrank-solutions java programming python
# [![Competitive Programming](https://i.postimg.cc/KzkzX3ZL/banner-optimized.png)](https://postimg.cc/1nSPwtV5) ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) ![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge&logo=go&logoColor=white) ![Rust](https://img.shields.io/badge/rust-%23000000.svg?style=for-the-badge&logo=rust&logoColor=white) ![C](https://img.shields.io/badge/c-%2300599C.svg?style=for-the-badge&logo=c&logoColor=white) ![Java](https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white) ![C++](https://img.shields.io/badge/c++-%2300599C.svg?style=for-the-badge&logo=c%2B%2B&logoColor=white) ![HackerRank](https://img.shields.io/badge/-Hackerrank-2EC866?style=for-the-badge&logo=HackerRank&logoColor=white) ![GeeksForGeeks](https://img.shields.io/badge/GeeksforGeeks-gray?style=for-the-badge&logo=geeksforgeeks&logoColor=35914c)

How to Contribute and Create a Pull Request (PR)

1. Fork and Clone the Repository

First, fork the repository, and star it if you like. To contribute, create a local copy of the repository by running the following command in your terminal:

git clone https://github.com/<your-username>/Competitive-Programming

Ensure to replace your-username with your GitHub username. You must fork the repository before cloning it.

2. Create a New Branch

Once cloned, navigate to the repository directory:

cd Competitive-Programming

Now, create a new branch to make your changes. Name the branch after your username:

git branch <your-branch-name>

Replace your-branch-name with your desired branch name, preferably your username, to avoid conflicts.

3. Switch to Your Branch

To start working on your new branch, switch to it by running:

git checkout <your-branch-name>

You will get a confirmation that you've successfully switched to your branch.

4. Add Your Programming Solution

Add your solution in any programming language. Be sure to:

5. Commit and Push Your Changes

After making changes, sync them to the repository. Start by adding all changes:

git add .

Now, commit your changes with a descriptive message:

git commit -m "ADD YOUR MESSAGE HERE (E.g., SOLVED HACKERRANK PROBLEM)"

Commit messages should describe where the problem was solved, like "FROM HACKERRANK" or "FROM LEETCODE". Use all caps for platform names.

Next, push your changes to your branch:

git push --set-upstream origin <your-branch-name>

Now, add the upstream remote repository:

git remote add upstream https://github.com/chaudharypraveen98/Competitive-Programming

6. Keep Your Repository in Sync

Periodically, sync your repository with the upstream repository to stay updated:

git fetch upstream
git checkout master
git merge upstream/master

7. Create a Pull Request (PR)

Once your changes are ready, go to your forked repository and click on New Pull Request. Follow the on-screen instructions to complete the PR submission.

Congratulations! You've successfully created a Pull Request!

8. Check if you find any relevant issue and link PR

Lastly, don't forget to update the corresponding issue if opened.


Code Base Guidelines

Where to Upload Files 📂

Contributors

Please add your name in the list in the following format:

- Name - [File Name](File Address)