Welcome to Algo Collection, a Hacktoberfest 2025 friendly space for learning algorithms and the GitHub workflow. Every contribution covers exactly one algorithm in exactly one programming language, plus a quick note in our contributors log.
- Follow me and ⭐ Star this repo first—it keeps you on the Hacktoberfest leaderboard and helps others discover us.
- Read the flow below before coding anything.
- Grab or open an issue for a single algorithm/language pair.
- Follow the naming rules, add your code, and register yourself in
contributors.json. - Open a PR that links your issue and passes the checklist.
- Star the repo: Click the ⭐ button at the top of the page. We track stars to highlight active contributors, and it is the first requirement before any contribution.
- Look for existing issues: Use the Issues tab to search for the algorithm and language you want to implement. Filter by open issues to avoid duplicates.
- Raise a new issue (if needed):
- Ensure nobody else has already opened the same algorithm/language request.
- Use the title format
[Language] Algorithm Name(for example,[Python] Binary Search). - In the issue body, include: short description, expected input/output, and any reference links.
- Only request one algorithm in one language per issue.
- Get assigned: Comment on the issue asking to be assigned. Wait until a maintainer assigns you before starting work.
- Fork the repository: Click Fork on GitHub to create your copy under your account.
- Clone your fork:
git clone https://github.com/<your-username>/algo-collection.git cd algo-collection
- Sync with upstream (recommended before each new task):
git remote add upstream https://github.com/G-SaiVishwas/algo-collection.git git fetch upstream git checkout main git merge upstream/main
- Create a feature branch:
Example:
git checkout -b feature/<language>-<algorithm-name>
feature/python-binary-search. - Write your algorithm inside the correct language folder (see structure below).
- Add yourself to
contributors.jsonby appending a new entry with your name, the algorithm, language, and file path (format shown later in this document). - Commit your work with a clear message:
git add <paths-you-changed> git commit -m "Add <Algorithm Name> in <Language>"
- Push and open a PR:
Open a pull request against
git push origin feature/<language>-<algorithm-name>
main, link the original issue, and fill in the PR checklist.
Algorithms live inside language-specific folders. Add new files to the correct directory (each folder includes a couple of starter examples to demonstrate the expected format):
algo-collection/
├── c/
├── cpp/
├── go/
├── java/
├── javascript/
├── python/
├── rust/
├── swift/
└── typescript/
Feel free to suggest additional languages by opening an issue first so we can create the folder together.
- The file lives at the repo root and starts as an empty JSON array:
[]. - Append one object per contributor and keep existing entries intact.
- Sample entry (replace values with your details):
[
{
"name": "Your Name",
"algorithm": "Binary Search",
"language": "Python",
"file": "python/binary_search.py"
}
]If entries already exist, place your object just before the closing ] and add a comma after the previous entry.
- Use lowercase letters, hyphens, or underscores:
algorithm-name.ext(examples:binary-search.py,merge_sort.java). - One file per algorithm implementation.
- Include a short header comment describing the algorithm, expected input/output, and time complexity where possible.
- Place helper classes or test code in the same file unless the language requires otherwise (open an issue to discuss exceptions).
- Do not duplicate an algorithm that already exists in the same language; improve the existing one instead by discussing in the issue.
- Keep implementations simple and educational. Prioritize readability over micro-optimizations.
- Add inline comments only when logic is non-obvious. Keep them concise.
- Use standard library features whenever available.
- Include a minimal usage example or a
main/driverfunction that demonstrates the algorithm. - Ensure the code compiles or runs without additional dependencies.
- I starred this repository before contributing.
- My issue title follows
[Language] Algorithm Name. - My PR references the issue number (for example,
Closes #12). - I follow G-SaiVishwas, and I have starred the repository.
- Only one algorithm implementation is included in this PR.
- File naming follows the prescribed pattern and resides in the correct language folder.
- I added my details to
contributors.jsonin the required format. - I tested the code locally (compile/run as applicable).
- Maintainers will review PRs in the order issues were assigned.
- Requested changes must be addressed within 7 days to keep the PR active.
- Once approved, maintainers will merge the PR and label it for Hacktoberfest 2025 participation.
- Open a new issue with the
questionlabel. - Join the discussion on existing issues to learn from other contributors.
- Check the GitHub Discussions tab (coming soon) for FAQs, setup guides, and study resources.
Thank you for contributing and helping beginners grow through open source. Remember: star the repo, raise an issue, follow the rules, and enjoy building the Algo Collection together!