Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 56 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,42 @@
Write any algorithm, data structure demo or general application in the programming language of your choice, and open a
pull request. Your request will be assigned to one of the maintainers and reviewed as soon as possible.

## Writing a Good Pull Request Description

A well-written PR description helps maintainers understand and review your contribution quickly. Please include:

### ✅ Good Example:
```
## Category
- [x] Sorting Algorithm

## Algorithm/Data Structure Description
This is a Python implementation of Merge Sort algorithm. Merge Sort is a divide-and-conquer algorithm that divides the array into halves, recursively sorts them, and then merges the sorted halves. It guarantees O(n log n) time complexity in all cases.

## Implementation Details
**Programming Language:** Python
**Time Complexity:** O(n log n)
**Space Complexity:** O(n)
**Key Features:** Stable sort, works well with large datasets

## Testing
- [x] Yes, with sample inputs
- [x] Yes, with edge cases
**Test cases included:** Empty array, single element, already sorted array, reverse sorted array
```

### ❌ Poor Examples:
- "Added algorithm" (too vague)
- "Please include a small description of your algorithm/data structure and add reference to the Hacktoberfest issue" (template not filled)
- "Hey! I added XYZ Algorithm." (no technical details)

### Required Information:
1. **Clear algorithm/data structure name and purpose**
2. **Programming language used**
3. **Time and space complexity (if applicable)**
4. **Brief explanation of how it works**
5. **Testing status**

# Are there any rules?

### 1. Make sure to put your code in an appropriate directory
Expand All @@ -15,13 +51,30 @@ pull request. Your request will be assigned to one of the maintainers and review

If you don't find a proper location, feel free to create it!

### 2. Make sure to that the code you're adding is of your own creation
## Code Quality Standards

### Documentation
- Add meaningful comments explaining complex logic
- Include function/method documentation where appropriate
- Consider adding a README.md in your algorithm's directory for complex implementations

### Code Style
- Use descriptive variable and function names
- Follow the standard conventions for your chosen programming language
- Keep functions focused and modular when possible

### Examples to Include
- At least one working example demonstrating your algorithm
- Sample input/output in comments or separate test file
- Edge case handling where relevant

### 2. Make sure that the code you're adding is of your own creation

If you think this goes without saying, then rest assured that this message is not for you; you most likely already abide
by this rule.

[The Hacktoberfest message is strong](https://hacktoberfest.digitalocean.com/details#quality-standards), and we want to
be in tune with their values. For that however, we maintainers have to be strict when dealing with spam, which is
[Open source contribution guidelines](https://hacktoberfest.digitalocean.com/details#quality-standards) emphasize quality contributions, and we want to
be in tune with these values. For that however, we maintainers have to be strict when dealing with spam, which is
plenty, unfortunately. So here's how it goes:

- **Spam PRs or PRs containing blatant copies of snippets from the web will be immediately tagged `invalid` and
Expand Down
47 changes: 40 additions & 7 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,46 @@
### Category
## Category

**EDIT ME** How would you categorize your contribution? (Graph search, greedy algorithm, dynamic programming, machine
learning algorithm, etc... Feel free to classify your code as you see fit.)
<!-- Choose the most appropriate category for your contribution -->
- [ ] Data Structure (e.g., linked list, tree, hash table)
- [ ] Sorting Algorithm (e.g., quicksort, mergesort, heapsort)
- [ ] Search Algorithm (e.g., binary search, depth-first search)
- [ ] Graph Algorithm (e.g., shortest path, minimum spanning tree)
- [ ] Dynamic Programming
- [ ] Greedy Algorithm
- [ ] Machine Learning Algorithm
- [ ] Mathematical Algorithm
- [ ] Other: _________________

### Description
## Algorithm/Data Structure Description

**EDIT ME** Please include a small description of your algorithm. Any context you provide will help us review your code
faster and more easily.
**Please provide a clear description of what your algorithm/data structure does:**

<!--
Example of a good description:
"This is a C++ implementation of the Quick Sort algorithm. Quick Sort is a divide-and-conquer algorithm that picks a pivot element and partitions the array around it, then recursively sorts the sub-arrays. It has an average time complexity of O(n log n)."

Replace this comment with your description:
-->

## Implementation Details

**Programming Language:** <!-- e.g., Python, Java, C++, JavaScript -->

**Time Complexity:** <!-- e.g., O(n log n), O(n^2) -->

**Space Complexity:** <!-- e.g., O(1), O(n) -->

**Key Features:** <!-- Any special features, optimizations, or variations -->

## Testing

**Have you tested your implementation?**
- [ ] Yes, with sample inputs
- [ ] Yes, with edge cases
- [ ] No

**Test cases included:** <!-- Describe any test cases you've verified -->

---

:beers: Hacktoberfest (#66)
🎯 **Contributing to open source algorithms collection**
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@

Hello, everyone!

Let's contribute to [**Hacktoberfest 2019**](https://hacktoberfest.digitalocean.com/) while refreshing our *data structures and algorithms* knowledge.
Welcome to our comprehensive collection of algorithms and data structures! This repository is perfect for learning, practicing, and contributing to the world of computer science fundamentals.

# [Hacktoberfest 2019 issue + Contribution Guidelines](https://github.com/pirataspinhal/algorithms/issues/126)
# 🚀 How to Contribute

Implement your favorite **data structure/algorithm/crazy magic in the programming language of your choice (the more the better!)** and open a pull request.
Implement your favorite **data structure/algorithm/computational solution in the programming language of your choice** and open a pull request.

It can be **anything!** Graph problems, sorting algorithms, dynamic programming, greedy algorithms... maybe something else entirely? Every contribution counts.
It can be **anything!** Graph problems, sorting algorithms, dynamic programming, greedy algorithms, machine learning algorithms, mathematical computations... maybe something else entirely? Every quality contribution counts.

As long as it's your own authentic piece of code, it's welcome! :wink:

## 📚 Getting Started
- Never contributed to a public repository before? [This is a good place to start](https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/#summary)

- Want tips on how to write short and sweet commit messages? [Check out this great article](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)

- Make sure to engage the community in a constructive manner! [**Please read our rules and guidelines before contributing**](https://github.com/pirataspinhal/algorithms/issues/126)
- **Make sure to read our [contribution guidelines](CONTRIBUTING.md) before submitting your pull request!**

## 🎯 What Makes a Great Contribution?
- Clear, well-documented code
- Descriptive pull request with algorithm explanation
- Time and space complexity analysis
- Test cases or examples
- Proper directory organization

# Credits

Expand Down