Skip to content

Commit 4d96644

Browse files
iamAntimPalAntim-IWPIamShiwangi
committed
Create CONTRIBUTING.md
Co-Authored-By: Antim-IWP <203163676+Antim-IWP@users.noreply.github.com> Co-Authored-By: Shiwangi Srivastava <174641070+IamShiwangi@users.noreply.github.com>
1 parent 81f5682 commit 4d96644

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

CONTRIBUTING.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Contributing to LeetCode Python Solutions
2+
3+
Thank you for considering contributing to this repository! Your contributions help make this project better and more comprehensive for everyone. Follow the guidelines below to ensure a smooth contribution process.
4+
5+
---
6+
7+
## 📜 Table of Contents
8+
9+
- [Getting Started](#getting-started)
10+
- [How to Contribute](#how-to-contribute)
11+
- [1. Fork the Repository](#1-fork-the-repository)
12+
- [2. Clone Your Fork](#2-clone-your-fork)
13+
- [3. Create a New Branch](#3-create-a-new-branch)
14+
- [4. Add Your Contribution](#4-add-your-contribution)
15+
- [5. Commit Your Changes](#5-commit-your-changes)
16+
- [6. Push to Your Fork](#6-push-to-your-fork)
17+
- [7. Submit a Pull Request](#7-submit-a-pull-request)
18+
- [Contribution Guidelines](#contribution-guidelines)
19+
- [Code of Conduct](#code-of-conduct)
20+
- [Need Help?](#need-help)
21+
22+
---
23+
24+
## Getting Started
25+
26+
1. Ensure you have [Git](https://git-scm.com/) installed on your system.
27+
2. Familiarize yourself with the structure of this repository.
28+
3. Make sure you have a GitHub account. If not, you can create one [here](https://github.com/).
29+
30+
---
31+
32+
## How to Contribute
33+
34+
### 1. Fork the Repository
35+
36+
Click the **Fork** button at the top-right corner of this repository to create a copy of it in your GitHub account.
37+
38+
### 2. Clone Your Fork
39+
40+
Clone your forked repository to your local machine using the following command:
41+
42+
```bash
43+
git clone https://github.com/<your-username>/LeetCode-Python-Solutions.git
44+
```
45+
46+
### 3. Create a New Branch
47+
48+
Create a new branch for your contribution. Use a descriptive name for your branch:
49+
50+
```bash
51+
git checkout -b add-solution-<problem-id>
52+
```
53+
54+
### 4. Add Your Contribution
55+
56+
- Navigate to the appropriate folder in the `Solution/` directory.
57+
- Add your solution file (e.g., `problem-id.py`) and update the `readme.md` file in the corresponding folder.
58+
- Ensure your code is well-documented and follows the repository's coding style.
59+
60+
### 5. Commit Your Changes
61+
62+
Commit your changes with a meaningful commit message:
63+
64+
```bash
65+
git add .
66+
git commit -m "Add solution for problem <problem-id>: <problem-title>"
67+
```
68+
69+
### 6. Push to Your Fork
70+
71+
Push your changes to your forked repository:
72+
73+
```bash
74+
git push origin add-solution-<problem-id>
75+
```
76+
77+
### 7. Submit a Pull Request
78+
79+
1. Go to the original repository on GitHub.
80+
2. Click the **Pull Requests** tab.
81+
3. Click **New Pull Request**.
82+
4. Select your branch and submit the pull request with a detailed description of your changes.
83+
84+
---
85+
86+
## Contribution Guidelines
87+
88+
1. **Follow the Repository Structure**: Ensure your contributions are added to the correct folder.
89+
2. **Write Clean Code**: Use meaningful variable names, add comments, and follow Python best practices.
90+
3. **Update Documentation**: If you add a new solution, update the corresponding `readme.md` file with the problem description, examples, and your solution.
91+
4. **Test Your Code**: Ensure your code runs without errors and passes all test cases.
92+
5. **Be Respectful**: Follow the [Code of Conduct](#code-of-conduct).
93+
94+
---
95+
96+
## Code of Conduct
97+
98+
We are committed to fostering a welcoming and inclusive environment. By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
99+
100+
---
101+
102+
## Need Help?
103+
104+
If you have any questions or need assistance, feel free to:
105+
106+
- Open an issue in the repository.
107+
- Reach out to the maintainers via GitHub.
108+
109+
---
110+
111+
Thank you for contributing! Together, we can make this repository a valuable resource for the coding community.

0 commit comments

Comments
 (0)