Leetcode solutions for NeetCode.io
I will periodically update the neetcode.io site with new solutions for this repo!
To contribute, please fork this repo and open a PR against main
for a problem that does not yet have a solution in a given language.
Solutions needed (will be linked from NeetCode.io):
- Java
- Javascript
Solutions are also welcome for any other supported language on leetcode.com!
Complete:
- Python
- C++
Please feel free to open a pull request to add solutions in other languages for the Neetcode 150 problem list. If you would like to have collaborator permissions on the repo to merge your own PRs or review others' PRs please let me know.
In order to get your PR reviewed as quickly as possible, please:
- adhere to existing naming conventions for files/directories
- prefer adding only one solution per PR (not a hard and fast rule, but will typically make the review cycle shorter)
- ensure your code passes submission on leetcode.com for the problem it solves
- ensure your code is clean (uses reasonable variable/method names, style, etc)
In general, multiple solutions to the same problem are accepted, as long as the solutions are distinct (unique approaches to solving the problem) and/or are distinctly efficient (in terms of runtime/space complexity, expressed in Big O notation). Please make sure distinct solutions are grouped together in the same file.
Note: leetcode.com's runtime benchmarking is notoriously inaccurate (re-running the same program frequently yields deltas in excess of 50%), and therefore should be cautiously used as evidence of a solution's efficiency.