Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Report errors on the issues page
. If you are reporting an issue, please include:
- Question for which issue came
- Language in which the code is not working
All the solutions available in the website at time of their creation are correct. But questions' language might change later and their solution might need to be updated/corrected. Look through the GitHub issues for some wrong solutions. Anything tagged with "bug" is open to whoever wants to implement it.
Add your solution in any language. Please add the language in langs
front matter for your post
You can add any question you want available on leetcode. Check Sample on how to add a question with its solutions
Ready to contribute? Here's how to set up foobar
for local.
- Fork the
foobar
repo on GitHub. - Clone your fork locally::
$ git clone git@github.com:rajat19/interview-questions.git
- Create a branch for local development::
$ git checkout -b name-of-your-bugfix-or-feature
- Commit your changes, quoting github issue in the commit message, if applicable and push your branch to GitHub::
$ git add .
$ git commit -m "Fix #XX - My awesome fix"
$ git push origin name-of-your-bugfix-or-feature
- Submit a pull request through the GitHub website.
Some things to keep in mind while adding questions/solutions-
- Questions and test cases are added in
markdown
files which have .md extensions. These are added in posts folder under their difficulty tab Have the following front matter for your post
---
layout: post
author: <AUTHOR_NAME>
title: <QUESTION_NAME>
topics: <QUESTION_TYPE>
langs: <SUPPORTED_LANGUAGES>
leetcode: <LEETCODE_LINK>
tc: <TIME_COMPLEXITY>
sc: <SPACE_COMPLEXITY
leetid: <LEETCODE_ID>
---
- The solutions are added in _includes/code folder. Add a folder with question name ex-
got-interesting
. Add your solutions in this folder only. - By default, the langs required are defined in
enabled_languages
in _config.yml. Update langs for your solution, only that would be read incode
folder