Skip to content

About

It contains questions from various online and offline platforms such as Hackerrank, Coding Ninjas, Codeforces, Leetcode, Codeforces etc

Topics

Resources

Stars

5 stars

Watchers

4 watching

Forks

Latest commit

Β 

History

1,146 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Competitive Programming

πŸ† One repo, every language β€” sharpen your problem-solving skills! 🧠

Python Go Rust C Java C++ JavaScript HackerRank GeeksForGeeks LeetCode

GitHub contributors GitHub issues GitHub pull requests PRs Welcome


πŸ“Œ Table of Contents


🎯 About the Repository

Welcome to Competitive Programming! πŸš€ This repository is a growing collection of solutions to problems from platforms like HackerRank, LeetCode, GeeksForGeeks and more β€” written in multiple programming languages including Python, Java, C, C++, Go, and Rust.

Whether you are preparing for coding interviews πŸ’Ό, learning a new language 🌱, or just love solving problems πŸ”₯ β€” this is the place for you!

πŸ—£οΈ Want this repo to include problems in Go, Rust, or beginner-friendly challenges? Check out the Request a New Feature section!


πŸ“‚ Repository Structure

Solutions are organized by platform or language. Here's how the repository is laid out:

Competitive-Programming/
β”œβ”€β”€ C/                    # C solutions (HackerRank & more)
β”œβ”€β”€ C++/                  # C++ solutions (HackerRank & more)
β”œβ”€β”€ Java/                 # Java solutions (HackerRank & more)
β”œβ”€β”€ Python/               # Python solutions (HackerRank, MLH & more)
β”œβ”€β”€ Leetcode/             # Solutions organized by LeetCode problem number
β”œβ”€β”€ GeeksForGeeks/        # GeeksForGeeks problem solutions
β”œβ”€β”€ Neetcode/             # NeetCode roadmap solutions
β”œβ”€β”€ Interview Question/   # Common interview questions
└── InterviewKit-HackerRank/ # HackerRank interview preparation kit

🀝 How to Contribute

Thanks for your interest in contributing! πŸŽ‰ Follow the steps below to submit your first 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 checkout -b <your-branch-name>

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

3️⃣ Add Your Solution ✍️

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

  • βœ… Optimize the code as much as possible.
  • βœ… Include comments to improve readability.
  • βœ… Place the file in the correct folder (see Repository Structure).

4️⃣ 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>

Then, add the upstream remote repository:

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

5️⃣ Keep Your Repository in Sync πŸ”„

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

git fetch upstream
git checkout master
git merge upstream/master

6️⃣ 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!

7️⃣ Link Your PR to an Issue πŸ”—

Lastly, don't forget to check if there is a relevant open issue for your contribution β€” if so, link your PR to it!


πŸ“ Code Base Guidelines

To keep the codebase clean and consistent, please follow these rules:

Rule Description
πŸ’¬ Comments Add comments on a new line to explain your code.
πŸ—οΈ Structure Follow the standard structure for the programming language.
πŸ“‚ Location Upload files inside the folder matching the language/platform (e.g., Java/Hackerrank for an algorithm implementation in Java).

πŸ’‘ Request a New Feature

Missing something you'd love to see here? πŸ€” We'd be happy to add it!

Please open an issue describing the feature you'd like to see in this repository, for example:

  • 🐹 A dedicated section for Go problems
  • πŸ¦€ Solutions in Rust
  • 🌱 A collection of beginner-friendly problems
  • βž• Any other idea that can improve this repo!

πŸ‘‰ Open a new issue here and we'll discuss it together!


πŸ‘₯ Contributors

A huge thank you to everyone who has contributed! πŸ™Œ

πŸ“‹ Want to see who solved what? Check out the full list in CONTRIBUTORS.md.

πŸ’‘ To get added, open a Pull Request with your solution β€” we'll add you automatically! πŸŽ‰


⭐ Show Your Support

If you find this repository helpful, please give it a star ⭐ β€” it really helps!

Made with ❀️ by Praveen Chaudhary and all the amazing contributors.

About

It contains questions from various online and offline platforms such as Hackerrank, Coding Ninjas, Codeforces, Leetcode, Codeforces etc

Topics

Resources

Stars

5 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages