Skip to content

Latest commit

 

History

History
97 lines (67 loc) · 4.04 KB

CONTRIBUTING.md

File metadata and controls

97 lines (67 loc) · 4.04 KB

Contributing to DSA

Thank you for considering contributing to our DSA-focused Java project! We welcome contributions that enhance the codebase, improve documentation, add new algorithms, or provide valuable insights. By following these guidelines, you'll help us maintain a high standard of quality and ensure consistency across the project.

Table of Contents

  1. Code of Conduct
  2. How to Contribute
  3. Reporting Bugs
  4. Feature Requests
  5. Code Contribution Guidelines
  6. Pull Request Process
  7. License

Code of Conduct

Please review and follow our Code of Conduct. We are committed to maintaining a welcoming environment for all contributors.

How to Contribute

There are several ways to contribute to this project:

  • Fix bugs or improve the existing codebase.
  • Add new data structures or algorithm implementations, including Leetcode solutions or interview questions.
  • Enhance documentation and improve code readability.
  • Suggest new features or improvements related to DSA topics.

Please ensure that any code contributions align with the DSA and Problem-Solving theme of the project.

Reporting Bugs

If you encounter a bug:

  1. Search for existing issues to check if it’s already been reported.
  2. If not, create a new issue.
  3. Provide a detailed description of the issue.
  4. Include steps to reproduce the problem, if applicable.
  5. Attach any relevant logs or context that can help us understand the issue.

Feature Requests

For suggesting new features or improvements:

  1. Open a new issue.
  2. Provide a detailed explanation of the problem you're addressing.
  3. Describe how your proposed feature fits into the project.

Code Contribution Guidelines

We welcome code contributions! Please follow these guidelines to ensure consistency and maintainability:

File Naming

  • Use descriptive and meaningful names for files that represent the data structure or algorithm implemented.
    • Example: BinarySearchTree.java, QuickSort.java

Coding Style

  • Follow standard Java conventions:
    • Variables and methods: Use camelCase.
    • Classes: Use PascalCase.
  • Avoid redundant comments but document complex or non-obvious logic.
  • Indentation: Use 4 spaces, no tabs.
  • Limit each line to 100 characters.
  • Include JavaDocs for all methods and classes.

Testing

  • Every new data structure or algorithm must have corresponding unit tests.
  • Use JUnit 5 (or specify another framework, if preferred).
  • Tests should cover both edge cases and expected behavior.

Commit Messages

  • Write clear and concise commit messages that explain the changes.
    • Example: Added QuickSort algorithm with tests or Fixed issue in LinkedList implementation.
  • If your commit addresses an open issue, reference the issue number.

Pull Request Process

To submit your contributions, follow these steps:

  1. Fork the repository and create a new branch for your feature or bug fix.
  • Naming convention for branches: feature/algorithm-name or fix/issue-description.
  1. Ensure no existing functionality is broken by running tests before submitting your PR.
  2. Submit a pull request (PR) with:
  • A clear description of the changes.
  • References to relevant issues, if applicable.
  1. Your PR will be reviewed, and feedback may be provided. Please be responsive to review comments and adjust your PR accordingly.

License

By contributing to this repository, you agree that your contributions will be licensed under the terms specified in the LICENSE file.