Skip to content

Commit 1e48e83

Browse files
docs: add code of conduct and contributing guidelines
1 parent 02dbff4 commit 1e48e83

File tree

3 files changed

+208
-0
lines changed

3 files changed

+208
-0
lines changed

CODE_OF_CONDUCT.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we, as contributors and maintainers, pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or email address, without their explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
Project maintainers have the right and responsibility to remove, edit, or reject contributions that are not aligned with this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [here]([email protected]) or [here]([email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html), version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
44+
45+
For answers to common questions about this code of conduct, see [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq).

CONTRIBUTING.md

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Contributing to [leetcode](https://github.com/ayusshrathore/leetcode)
2+
3+
Thank you for considering contributing to [Your Repository Name]! We welcome contributions from the community to help improve and grow this project. To get started, please follow the guidelines below.
4+
5+
## Getting Started
6+
7+
- Make sure you have a [GitHub account](https://github.com/signup) if you don't already.
8+
- Fork this repository to your GitHub account by clicking the **Fork** button at the top right of this page.
9+
- Clone the forked repository to your local machine:
10+
11+
```bash
12+
git clone https://github.com/ayusshrathore/leetcode
13+
```
14+
15+
- Create a new branch for your changes:
16+
17+
```bash
18+
git checkout -b my-new-branch
19+
```
20+
21+
- Make your changes to the project and commit them. Please follow the [commit message guidelines](#commit-message-guidelines).
22+
23+
- Push your changes to GitHub:
24+
25+
```bash
26+
git push origin my-new-branch
27+
```
28+
29+
- Open a pull request in this repository by clicking the **Pull Request** button at the top right of this page.
30+
31+
- Wait for your pull request to be reviewed and merged.
32+
33+
## Commit Message Guidelines
34+
35+
### Type
36+
37+
- **feat:** Use when adding new features or problems.
38+
- **fix:** Use when fixing bugs.
39+
- **refactor:** Use when refactoring code or making improvements.
40+
- **docs:** Use when updating documentation.
41+
- **test:** Use when adding or modifying tests.
42+
- **chore:** Use for routine tasks, maintenance, or non-code changes.
43+
44+
### Brief Description
45+
46+
Provide a concise description of the change, starting with a verb in the imperative mood (e.g., "Add solution for problem XYZ," "Fix issue with ABC").
47+
48+
### Optional Body
49+
50+
Include a more detailed explanation if the brief description is not sufficient. Describe the problem, solution, and relevant context. You can use bullet points or paragraphs for clarity.
51+
52+
### Optional Footer
53+
54+
- Reference related issues or pull requests using `Closes #issue-number` or `Fixes #issue-number` to automatically close them when the commit is merged.
55+
- Include any breaking changes or important information for other contributors.
56+
57+
#### Examples
58+
59+
- Adding a new LeetCode problem:
60+
61+
```
62+
feat: Add solution for problem 123
63+
```
64+
65+
- Fixing a bug in an existing solution:
66+
67+
> Correct an edge case handling bug in the Python solution.
68+
> Fixes #456
69+
70+
```
71+
fix: Fix issue with solution for problem 456
72+
```
73+
74+
- Refactoring an existing solution:
75+
76+
> Simplify algorithm logic for problem 789.
77+
78+
> Enhance code comments for clarity.
79+
80+
```
81+
refactor: Improve code structure in solution for problem 789
82+
```
83+
84+
- Updating documentation:
85+
86+
```
87+
docs: Update README with instructions for contributions
88+
```
89+
90+
> **Note**: For more information on commit message guidelines, see [conventionalcommits](https://www.conventionalcommits.org/en/v1.0.0/).
91+
92+
## Organizing and Solving Problems
93+
94+
<!-- create an nice looking path list -->
95+
96+
- Browse through the existing sections in the repository to find the topic or category where you'd like to contribute.
97+
98+
- If you're adding a new problem, make sure it's not already in the repository to avoid duplicates. If it's not already in the repository, create a new folder with a README.md file inside it. The README.md file should contain a brief description of the problem, a link to the problem on LeetCode, and a link to the solution.
99+
100+
- Create a new directory under the appropriate section for your problem (e.g., arrays, strings, trees, etc.).
101+
102+
- Add your problem's code in a language-specific subdirectory within the problem's directory (e.g., python, java, cpp, etc.).
103+
104+
- Include a clear and concise solution description in Markdown format. You can create a separate Markdown file within the problem's directory or add it as comments in your code.
105+
106+
- Ensure your code follows the coding conventions and style guide of the repository.

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Welcome to the LeetCoding Quest for Hacktoberfest 2023! 🚀
2+
3+
Unleash your coding prowess and join us on an epic journey through the LeetCode universe! 🌌
4+
5+
<p align="center">
6+
<img src="https://hacktoberfest.com/_next/static/media/logo-hacktoberfest--logomark.b91c17d2.svg" alt="LeetCoding" width="200">
7+
8+
</p>
9+
10+
## About This Repository
11+
12+
This repository is your passport to the world of LeetCode problem-solving. Here, we tackle challenges, unlock algorithmic mysteries, and share our solutions with fellow developers. Whether you're a coding prodigy or just embarking on your coding adventure, this repository is your trusty companion.
13+
14+
## Hacktoberfest 2023
15+
16+
Hold on tight because we're taking part in Hacktoberfest 2023! 🎉 Hacktoberfest is that special time of the year when we celebrate open source, learn from each other, and make the digital world a better place. Join the fun, contribute, and let's make this Hacktoberfest unforgettable!
17+
18+
### How to Join Hacktoberfest as a Contributor
19+
20+
Joining Hacktoberfest as a contributor is as easy as 1-2-3:
21+
22+
1. **Sign Up**: Register for Hacktoberfest on the [official website](https://hacktoberfest.digitalocean.com/).
23+
24+
2. **Find Projects**: Explore open source projects on GitHub, like ours, and contribute by creating pull requests. Remember, quality contributions matter!
25+
26+
3. **Contribute**: Submit at least four pull requests
27+
28+
## How to Contribute
29+
30+
Ready to be a hero of Hacktoberfest? Here's how to jump in:
31+
32+
1. Fork this repository.
33+
2. Choose a LeetCode problem that piques your interest.
34+
3. Create a new branch for your coding adventure.
35+
4. Solve the problem, add your code, and explain your wizardry.
36+
5. Push your changes to your GitHub fortress.
37+
6. Summon a pull request to this repository.
38+
39+
No matter your coding level, your contributions are pure gold. Whether you're wielding a keyboard for the first time or you're a battle-hardened developer, your journey is important to us.
40+
41+
## Getting Help
42+
43+
Should you need guidance on your quest, encounter dragons, or seek wisdom, open an issue in this repository. We'll be your mentors, companions, and fellow adventurers!
44+
45+
Ready to embark on the LeetCoding Quest for Hacktoberfest 2023? Let's write some code and make magic happen! 🔮✨
46+
47+
## Contributing
48+
49+
Contributions are welcome and greatly appreciated! Please follow the [guidelines](CONTRIBUTING.md) when contributing to this project.
50+
51+
## Code of Conduct
52+
53+
Make sure to review and follow the [Code of Conduct](CODE_OF_CONDUCT.md) when contributing to this project.
54+
55+
## Reporting Issues
56+
57+
If you encounter any issues or have suggestions for improvements, please [open an issue](https://github.com/ayusshrathore/leetcode/issues) on the GitHub repository.

0 commit comments

Comments
 (0)