Skip to content

Latest commit

 

History

History
221 lines (171 loc) · 5.2 KB

File metadata and controls

221 lines (171 loc) · 5.2 KB

Contributing to DSA Practice Ground

Thank you for your interest in contributing! This project aims to help others learn DSA through hands-on practice.

🎯 What We're Looking For

  • New algorithms and data structures
  • Improved wiki guides
  • Additional test cases
  • Bug fixes
  • Documentation improvements

📋 Guidelines for Adding New Content

Adding a New Algorithm/Data Structure

When adding new content, please include:

  1. Skeleton Implementation (src/main/java/...)

    • Method signatures with clear names
    • JavaDoc comments explaining parameters and return values
    • TODO markers where implementation is needed
    • Include complexity analysis in class-level JavaDoc
  2. Comprehensive Tests (src/test/java/...)

    • Use JUnit 5
    • All test assertions initially commented out with TODO
    • Cover edge cases: empty, single element, duplicates, large inputs
    • Include both positive and negative test cases
    • Test method names should clearly describe what they test
  3. Wiki Guide (wiki/...)

    • Problem description - What needs to be implemented
    • What it is - Brief explanation of the concept
    • Characteristics - Time/space complexity, properties
    • How it works - Step-by-step explanation
    • Your task - What methods to implement
    • Test cases - What to consider
    • Hints - Guidance WITHOUT giving the solution
    • Applications - Real-world use cases
    • Common pitfalls - What to watch out for
    • Follow-up questions - To deepen understanding
    • Related topics - Links to similar concepts
    • NO SOLUTIONS - The guide should help, not solve

Code Style

/**
 * Brief description of what this does
 * Time Complexity: O(?)
 * Space Complexity: O(?)
 * 
 * TODO: Implement [algorithm name]
 * See wiki/[AlgorithmName].md for problem description and hints
 */
public class AlgorithmName {
    
    /**
     * Method description
     * @param param description
     * @return what it returns
     */
    public ReturnType methodName(ParamType param) {
        // TODO: Implement this method
        
    }
}

Test Style

@Test
void testDescriptiveNameOfWhatIsBeingTested() {
    // Setup
    DataStructure ds = new DataStructure();
    
    // TODO: Uncomment when implementation is complete
    // Execute and assert
    // assertEquals(expected, actual);
    // assertTrue(condition);
}

Wiki Guide Template

# [Algorithm/Data Structure Name]

## Problem Description
[What needs to be implemented]

## What is [Name]?
[Brief explanation]

## Characteristics
- **Time Complexity**: O(?)
- **Space Complexity**: O(?)
- **Key properties**

## How It Works
[Step-by-step explanation]

## Your Task
Implement the following methods:
1. method1
2. method2

## Test Cases to Consider
- Case 1
- Case 2

## Hints
[Guidance without solutions]

## Applications
[Real-world uses]

## Common Pitfalls
[What to avoid]

## Follow-up Questions
[To deepen understanding]

## Related Topics
[Links to similar concepts]

🔍 Pull Request Process

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/algorithm-name
  3. Add your content following the guidelines above
  4. Test that your code compiles and tests are structured correctly
  5. Commit with clear messages: git commit -m "Add Heap Sort algorithm"
  6. Push to your fork: git push origin feature/algorithm-name
  7. Create a Pull Request with:
    • Clear title
    • Description of what you added
    • Why it's useful for learners

✅ Checklist Before Submitting

  • Code compiles without errors
  • All methods have JavaDoc comments
  • TODO markers are in place
  • Tests are comprehensive and initially commented
  • Wiki guide is complete and helpful (no solutions!)
  • Complexity analysis is included
  • Edge cases are considered
  • Code follows existing style
  • No actual implementations in skeleton code

🎓 Priority Topics

We especially welcome contributions for:

Advanced Data Structures

  • AVL Tree
  • Red-Black Tree
  • B-Tree
  • Skip List
  • Segment Tree
  • Fenwick Tree (Binary Indexed Tree)

Advanced Algorithms

  • A* Search
  • Bellman-Ford
  • Floyd-Warshall
  • Kruskal's MST
  • Prim's MST
  • Strongly Connected Components
  • More DP problems (Edit Distance, Coin Change, etc.)

Additional Features

  • Performance benchmarks
  • Visualization tools
  • More test cases
  • Video tutorials
  • Interactive examples

📝 Documentation Improvements

Help improve existing wiki guides:

  • Clearer explanations
  • Better examples
  • More hints
  • Additional test cases
  • Fixing typos or errors

🐛 Bug Reports

Found a bug? Please include:

  1. What you expected to happen
  2. What actually happened
  3. Steps to reproduce
  4. Your environment (Java version, OS)

💡 Suggesting New Topics

Open an issue with:

  • Algorithm/data structure name
  • Why it's useful for learners
  • Difficulty level
  • Common interview frequency

🤝 Code of Conduct

  • Be respectful and welcoming
  • Focus on helping learners
  • Provide constructive feedback
  • Remember: everyone is learning!

❓ Questions?

Open an issue or start a discussion. We're here to help!


Thank you for contributing to the learning journey of others! 🚀