Welcome to the Algorithm Repository — a collaborative platform for algorithmic learning and problem solving in C++, Java, and Python.
This repository is designed to be Hacktoberfest friendly 🎃 and open for contributions from programmers around the world.
Each branch represents a programming language:
| Branch | Language | Description |
|---|---|---|
cpp |
C++ | Solutions and algorithms implemented in C++ |
java |
Java | Solutions and algorithms implemented in Java |
python |
Python | Solutions and algorithms implemented in Python |
⚠️ All commits and PRs must be made to the branch corresponding to the language you are contributing in.
💡 If the language branch does not exist yet, create a new branch with the name of that language and add your solution there.
You can contribute in two main ways:
- Add solutions for problems from:
- Each solution should include:
- The problem statement or link
- A clear explanation of your approach (AI tools like ChatGPT, Gemini are allowed for explanation)
- Properly formatted and commented code
cpp/ ┣ LeetCode/ ┃ ┗ 001_Two_Sum.cpp ┣ GFG/ ┃ ┗ Longest_Palindromic_Subsequence.cpp ┣ CodeChef/ ┃ ┗ STARTER100_MXSMALL.cpp
yaml Copy code
- Add algorithms in the
algo/folder with:- Clear explanation
- Code implementation
- Time & space complexity analysis
algo/ ┗ Dijkstra_Algorithm.cpp
yaml Copy code
- Fork the repository
- Clone your fork locally:
git clone https://github.com/<your-username>/Algo.git
Checkout to the correct language branch or create one if it doesn’t exist:
bash
Copy code
git checkout cpp # or java / python
# OR create new branch for other language
git checkout -b <language-name>
Add your code in the appropriate folder
Commit changes:
bash
Copy code
git add .
git commit -m "Added [ProblemName] solution in [Language] with explanation"
Push your branch:
bash
Copy code
git push origin <branch-name>
Create a Pull Request (PR):
Base branch → the corresponding language branch
Provide a clear PR title and description
Include problem link and summary of explanation
✅ PR Acceptance Criteria
PRs will be merged if:
Code belongs to the correct language branch
Code is well-documented and formatted
Explanation is clear and thorough
Commit messages and PR title are meaningful
No plagiarism or spam
💡 Solutions may use AI tools (ChatGPT, Gemini, etc.) for explanations, but code must be original and clear.