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.
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.
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.
Add your solution in any programming language. Be sure to:
- Optimize the code as much as possible.
- Include comments to improve readability.
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
Periodically, sync your repository with the upstream repository to stay updated:
git fetch upstream
git checkout master
git merge upstream/master
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!
Lastly, don't forget to update the corresponding issue if opened.
- Add comments in a new line to explain your code.
- Follow the standard structure for the programming language.
- Upload your files inside the code folder under the corresponding language sub-folder. (e.g., Java/Hackerrank for an algorithm implementation in Java).
Please add your name in the list in the following format:
- Name - [File Name](File Address)
- Praveen Chaudhary - Athlete Sort
- profumato4 - Java - Java Substring
- profumato4 - Java - Java Substring Comparison
- profumato4 - Java - Java String Introduction
- profumato4 - Java - Java String Reverse
- profumato4 - Java - Java Anagrams
- profumato4 - Java - Java String Tokens
- profumato4 - Java - Pattern Syntax Checker
- profumato4 - Java - Valid Username Regular Expression
- profumato4 - Java - Welcome to Java
- profumato4 - Java - Can You Access
- profumato4 - Java - Covariant Return Types
- profumato4 - Java - Java Abstract Class
- profumato4 - Java - Java Annotations
- profumato4 - Java - Java Arraylist
- profumato4 - Java - Java BigDecimal
- profumato4 - Java - Java BigInteger
- profumato4 - Java - Java BitSet
- profumato4 - Java - Java Comparator
- profumato4 - Java - Java Currency Formatter
- profumato4 - Java - Java Datatypes
- profumato4 - Java - Java Data and Time
- profumato4 - Java - Java Dequeue
- profumato4 - Java - Java End of file
- profumato4 - Java - Tag Content Extractor
- profumato4 - Java - Java Primality Test
- profumato4 - Java - Java 1D Array
- profumato4 - Java - Java 2D Array
- profumato4 - Java - Java Subarray
- profumato4 - Java - Java 1D Array Part 2
- profumato 4 - Java - Java List
- profumato4 - Java - Java Map
- profumato4 - Java - Java Stack
- profumato4 - Java - Java Hashset
- profumato4 - Java - Java Generics
- profumato4 - Java - Java Sort
- profumato4 - Java - Java Inheritance I
- profumato4 - Java - Java Inheritance II
- profumato4 - Java - Java Interface
- profumato4 - Java - Java Priority Queue
- profumato4 - Java - Java Regex 2 Duplicate Words
- profumato4 - Java - Java Method Overriding
- profumato4 - Java - Java Method Overriding 2 Super Keyword
- profumato4 - Java - Java Instanceof Keyword
- profumato4 - Java - Java Iterator
- profumato4 - Java - Lambda Expressions
- profumato4 - Java - Java MD5
- profumato4 - Java - Java Exception Handling Try Catch
- profumato4 - Java - Java Exception Handling
- profumato4 - Java - Java Reflection Attributes
- profumato4 - Java - Prime Checker
- profumato4 - Java - Java Factory Pattern
- profumato4 - Java - Java Singleton Pattern
- profumato4 - Java - Java Visitor Pattern
- profumato4 - Java - Java Varargs Simple Addition
- profumato4 - C - Hello World in C
- profumato4 - C - Playing With Characters
- profumato4 - C - Sum and Difference of Two Numbers
- profumato4 - Java - Java if-else
- profumato4 - Java - Java int to String
- profumato4 - Java - Java Loops I
- profumato4 - Java - Java loops II
- profumato4 - Java - Java Output Formatting
- profumato4 - Java - Java Regex
- profumato4 - Java - Java SHA 256
- profumato4 - Java - Java Static Initializer Block
- profumato4 - Java - Java Stdin and Stdout I
- profumato4 - Java - Java Stdin and Stdout II
- profuamto4 - C - Funcitons in C
- profumato4 - C - Pointers in C
- profumato4 - C - Conditional Statements in C
- profumato4 - C - For loop in C
- profumato4 - C - Sum of Digits of a Five Digit Number
- profumato4 - C - Bitwise Operators
- profumato4 - C - Printing Pattern Using Loops
- profumato4 - C - 1D Arrays in C
- profumato4 - C - Array Reversal
- profumato4 - C - Printing Tokens
- profumato4 - C - Digit Frequency
- profumato4 - C - Dynamic Array in C
- profumato4 - C - Boxes through a Tunnel
- profumato4 - C - Calculate the Nth term
- profumato4 - C - Permutations of Strings
- profumato4 - C - Post Transition
- profumaot4 - C - Querying the Document
- profumato4 - C - Small Triangles Large Triangles
- profumato4 - C - Sorting Array of Strings
- profumato4 - C - Structuring the Document
- profumato4 - C - Students Marks Sum
- profumato4 - C - Variadic functions in C
- profuamto4 - C++ - Say Hello World in C
- SakuraWhisper - C++ - For Loop
- SakuraWhisper - C++ - Vector Sort
- SakuraWhisper - C++ - Structs
- SakuraWhisper - C++ - Pointer