Thank you for your interest in contributing to the LeetCode 75 repository! We appreciate your contributions to this project. Before you start, please read and follow these guidelines to ensure a smooth and organized contribution process.
-
Fork the Repository: Click the "Fork" button at the top right corner of the LeetCode 75 repository to create your copy of the repository.
-
Clone Your Fork: Clone your forked repository to your local machine using the following command (replace
<your-username>
with your GitHub username):git clone https://github.com/yourusername/leetcode_75.git
-
Create a New Branch: Create a new branch to work on your contributions. Name your branch descriptively, e.g.,
feat-amals7
.git checkout -b feat-amals7
-
Answering Questions: Under the
questions
directory, you'll find subdirectories for each question in the LeetCode 75 list. To contribute an answer, navigate to the respective question directory and create a new file named according to this format:<your-name>-<your-semester>.py
(e.g.,amals7.py
). Place your Python solution in this file. -
Commit Changes: Add and commit your changes to your branch:
git add . git commit -m "Add solution for <question-name>"
-
Push to Your Fork: Push your changes to your fork on GitHub:
git push origin feat-amals7
-
Create a Pull Request: Go to your fork on GitHub and click the "New Pull Request" button. Compare the changes and create the pull request. Provide a clear and concise title and description for your pull request.
-
Review and Approval: The repository maintainers will review your contribution. Make sure to respond to any feedback or comments if needed.
-
Merge: Once your pull request is approved, it will be merged into the main repository.
-
Sync with Upstream: Periodically, sync your fork with the upstream repository to keep your fork up-to-date:
git fetch upstream git checkout main git merge upstream/main git push origin main
Happy coding! 🚀