Skip to content

Latest commit

Β 

History

History
504 lines (395 loc) Β· 11.5 KB

File metadata and controls

504 lines (395 loc) Β· 11.5 KB

🀝 Contributing to Hacktoberfest 2025

Thank you for your interest in contributing to this repository! This guide will help you make meaningful contributions that will be accepted and merged.

πŸ“‹ Table of Contents

πŸ“œ Code of Conduct

This project follows the Contributor Covenant Code of Conduct. By participating, you agree to uphold this code.

Our Pledge

  • Be respectful and inclusive
  • Welcome newcomers and help them learn
  • Focus on constructive feedback
  • Respect different viewpoints and experiences
  • Accept responsibility for our words and actions

πŸš€ Getting Started

Prerequisites

  • Git installed on your system
  • GitHub account
  • Basic knowledge of programming languages (C, C++, Java, Python, JavaScript)
  • Understanding of data structures and algorithms

Fork and Clone

  1. Fork the repository by clicking the "Fork" button
  2. Clone your fork:
    git clone https://github.com/YOUR_USERNAME/Projects-and-Interview-Question-Hacktoberfest2025.git
    cd Projects-and-Interview-Question-Hacktoberfest2025
  3. Add the original repository as upstream:
    git remote add upstream https://github.com/ORIGINAL_OWNER/Projects-and-Interview-Question-Hacktoberfest2025.git

🎯 How to Contribute

1. Choose Your Contribution Type

πŸ†• New Problems/Solutions

  • Add new coding problems with solutions
  • Implement problems in different programming languages
  • Add explanations and complexity analysis

πŸ“š Documentation

  • Improve existing README files
  • Add code comments and explanations
  • Create tutorials and guides
  • Fix typos and grammar errors

πŸ› Bug Fixes

  • Fix errors in existing code
  • Improve algorithm efficiency
  • Correct complexity analysis
  • Fix compilation/runtime errors

πŸ”§ Enhancements

  • Optimize existing solutions
  • Add test cases
  • Improve code structure
  • Add input validation

2. Find Issues to Work On

Good First Issues

Look for issues labeled with:

  • good first issue
  • hacktoberfest
  • help wanted
  • documentation

Create Your Own

If you don't find an existing issue, you can:

  • Add new problems to existing folders
  • Create new algorithm categories
  • Add solutions in new programming languages
  • Improve existing implementations

πŸ“ Project Structure

Projects-and-Interview-Question-Hacktoberfest2025/
β”œβ”€β”€ README.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ Algorithm-Complexity-Reference.md
β”œβ”€β”€ Array-Programs/
β”œβ”€β”€ Binary-Search-Questions/
β”œβ”€β”€ C/
β”œβ”€β”€ C++/
β”œβ”€β”€ Java/
β”œβ”€β”€ Python/
β”œβ”€β”€ JavaScript-Algorithms/
β”œβ”€β”€ Graph-Algorithms/
β”œβ”€β”€ Hash-Table-Problems/
β”œβ”€β”€ Queue-Problems/
β”œβ”€β”€ Stack-Problems/
β”œβ”€β”€ System-Design-Interview-Questions/
└── ... (other folders)

Folder Naming Convention

  • Use PascalCase for folder names
  • Be descriptive and clear
  • Examples: Binary-Search-Questions, Graph-Algorithms

File Naming Convention

  • Use snake_case for file names
  • Include problem description
  • Examples: two_sum.py, binary_search.java

πŸ“ Coding Standards

General Guidelines

  1. Write clean, readable code
  2. Add meaningful comments
  3. Follow language-specific conventions
  4. Include time and space complexity
  5. Add example usage

Language-Specific Standards

Python

def binary_search(arr, target):
    """
    Binary search implementation.
    
    Args:
        arr: Sorted list of integers
        target: Value to search for
    
    Returns:
        int: Index of target, -1 if not found
    
    Time Complexity: O(log n)
    Space Complexity: O(1)
    """
    left, right = 0, len(arr) - 1
    
    while left <= right:
        mid = (left + right) // 2
        if arr[mid] == target:
            return mid
        elif arr[mid] < target:
            left = mid + 1
        else:
            right = mid - 1
    
    return -1

# Example usage
if __name__ == "__main__":
    arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]
    target = 5
    result = binary_search(arr, target)
    print(f"Target {target} found at index {result}")

Java

/**
 * Binary search implementation.
 * 
 * @param arr Sorted array of integers
 * @param target Value to search for
 * @return Index of target, -1 if not found
 * 
 * Time Complexity: O(log n)
 * Space Complexity: O(1)
 */
public static int binarySearch(int[] arr, int target) {
    int left = 0, right = arr.length - 1;
    
    while (left <= right) {
        int mid = left + (right - left) / 2;
        if (arr[mid] == target) {
            return mid;
        } else if (arr[mid] < target) {
            left = mid + 1;
        } else {
            right = mid - 1;
        }
    }
    
    return -1;
}

// Example usage
public static void main(String[] args) {
    int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    int target = 5;
    int result = binarySearch(arr, target);
    System.out.println("Target " + target + " found at index " + result);
}

C++

/**
 * Binary search implementation.
 * 
 * @param arr Sorted array of integers
 * @param n Size of array
 * @param target Value to search for
 * @return Index of target, -1 if not found
 * 
 * Time Complexity: O(log n)
 * Space Complexity: O(1)
 */
int binarySearch(int arr[], int n, int target) {
    int left = 0, right = n - 1;
    
    while (left <= right) {
        int mid = left + (right - left) / 2;
        if (arr[mid] == target) {
            return mid;
        } else if (arr[mid] < target) {
            left = mid + 1;
        } else {
            right = mid - 1;
        }
    }
    
    return -1;
}

// Example usage
int main() {
    int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    int n = sizeof(arr) / sizeof(arr[0]);
    int target = 5;
    int result = binarySearch(arr, n, target);
    cout << "Target " << target << " found at index " << result << endl;
    return 0;
}

Documentation Standards

README Files

Each folder should have a comprehensive README.md file:

# πŸ“š Folder Name

Brief description of what this folder contains.

## 🎯 What is [Topic]?

Brief explanation of the concept.

## πŸ“ Problems Covered

### Easy Level
1. **Problem Name** - Brief description
2. **Problem Name** - Brief description

### Medium Level
1. **Problem Name** - Brief description
2. **Problem Name** - Brief description

### Hard Level
1. **Problem Name** - Brief description
2. **Problem Name** - Brief description

## πŸ› οΈ Implementation Languages

- **Language 1** - Brief description
- **Language 2** - Brief description

## ⏱️ Time Complexities

| Operation | Complexity | Notes |
|-----------|------------|-------|
| Operation 1 | O(1) | Constant time |
| Operation 2 | O(n) | Linear time |

## πŸš€ How to Run

### Language 1
```bash
command to run

Language 2

command to run

πŸ“– Learning Resources

🀝 Contributing

Feel free to add more problems, improve existing solutions, or add implementations in other languages!


Happy Coding! πŸŽ‰


## πŸ”„ Pull Request Process

### 1. Create a Branch
```bash
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-fix-name

2. Make Your Changes

  • Write clean, well-commented code
  • Add tests if applicable
  • Update documentation
  • Follow coding standards

3. Commit Your Changes

git add .
git commit -m "Add: Brief description of changes

- Detailed change 1
- Detailed change 2
- Detailed change 3

Fixes #issue_number"

4. Push to Your Fork

git push origin feature/your-feature-name

5. Create a Pull Request

  1. Go to your fork on GitHub
  2. Click "New Pull Request"
  3. Fill out the PR template
  4. Submit the PR

Pull Request Template

## πŸ“ Description
Brief description of what this PR does.

## πŸ”§ Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement

## πŸ“ Files Changed
- file1.py
- file2.java
- README.md

## πŸ§ͺ Testing
- [ ] Code compiles/runs without errors
- [ ] Added test cases
- [ ] All tests pass

## πŸ“š Documentation
- [ ] Updated README files
- [ ] Added code comments
- [ ] Updated complexity analysis

## πŸ” Checklist
- [ ] Code follows project standards
- [ ] Self-review completed
- [ ] No merge conflicts
- [ ] Ready for review

## πŸ“Έ Screenshots (if applicable)
Add screenshots to help explain your changes.

## 🎯 Related Issues
Fixes #issue_number

πŸ› Issue Guidelines

Creating Issues

  1. Search existing issues before creating new ones
  2. Use clear, descriptive titles
  3. Provide detailed descriptions
  4. Include steps to reproduce (for bugs)
  5. Add labels when possible

Issue Templates

Bug Report

## πŸ› Bug Description
Clear and concise description of the bug.

## πŸ”„ Steps to Reproduce
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## βœ… Expected Behavior
What you expected to happen.

## ❌ Actual Behavior
What actually happened.

## πŸ“Έ Screenshots
If applicable, add screenshots.

## πŸ–₯️ Environment
- OS: [e.g., Windows 10, macOS, Linux]
- Browser: [e.g., Chrome, Firefox, Safari]
- Version: [e.g., 22]

## πŸ“ Additional Context
Add any other context about the problem here.

Feature Request

## πŸš€ Feature Description
Clear and concise description of the feature.

## πŸ’‘ Motivation
Why is this feature needed?

## πŸ“‹ Detailed Requirements
- Requirement 1
- Requirement 2
- Requirement 3

## 🎯 Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3

## πŸ“ Additional Context
Add any other context or screenshots about the feature request here.

πŸ† Recognition

Contributors

All contributors will be recognized in:

  • README.md contributors section
  • GitHub contributors page
  • Release notes

Hacktoberfest

  • Valid PRs count toward Hacktoberfest goals
  • Maintainers will review and merge quality contributions
  • Spam or low-quality PRs will be marked as invalid

Special Recognition

  • Top Contributors: Most meaningful contributions
  • Documentation Heroes: Best documentation improvements
  • Code Quality Champions: Cleanest, most efficient code
  • Community Helpers: Most helpful in discussions

πŸ“ž Getting Help

Questions?

  • Open a discussion in GitHub Discussions
  • Ask in the project's Discord/Slack (if available)
  • Check existing issues and PRs

Need Help with Git?

Need Help with Programming?

πŸ“œ License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project.

πŸ™ Thank You

Thank you for contributing to this project! Your contributions help make this repository a valuable resource for developers worldwide.


Happy Contributing! πŸŽ‰

Last updated: October 2024