This project contains solutions to the top 150 LeetCode interview questions, implemented in Python, Go, JavaScript, and TypeScript.
golang/: Contains Go implementations of the solutions.python/: Contains Python implementations of the solutions.javascript/: Contains JavaScript implementations of the solutions.typescript/: Contains TypeScript implementations of the solutions.
- Installation
- Usage
- Contributing
- License
- Contact
- References
- Project Status
- Release History
- Author
- Contributors
- Ensure you have Go installed. You can download it from here.
- Clone the repository:
git clone https://github.com/rezamobaraki/leetcode-top-interview-150.git cd leetcode-top-interview-150/golang - Run the Go files:
go run <filename>.go
- Ensure you have Python installed. You can download it from here.
- Clone the repository:
git clone https://github.com/rezamobaraki/leetcode-top-interview-150.git cd leetcode-top-interview-150/python - Run the Python files:
python <filename>.py
- Ensure you have Node.js installed. You can download it from here.
- Clone the repository:
git clone https://github.com/rezamobaraki/leetcode-top-interview-150.git cd leetcode-top-interview-150/javascript - Run the JavaScript files:
node <filename>.js
- Ensure you have Node.js and TypeScript installed. You can download Node.js from here and install TypeScript globally using:
npm install -g typescript
- Clone the repository:
git clone https://github.com/rezamobaraki/leetcode-top-interview-150.git cd leetcode-top-interview-150/typescript - Compile and run the TypeScript files:
tsc <filename>.ts node <filename>.js
Each file in the golang/, python/, javascript/, and typescript/ directories corresponds to a specific LeetCode problem. You can run the files to see the solutions in action.
To run the is-subsequence solution in Go:
cd golang/two-pointer
go run is-subsequence.goTo run the is-subsequence solution in Python:
cd python/two-pointer
python is-subsequence.pyTo run the is-subsequence solution in JavaScript:
cd javascript/two-pointer
node is-subsequence.jsTo run the is-subsequence solution in TypeScript:
cd typescript/two-pointer
tsc is-subsequence.ts
node is-subsequence.jsTo run any solution, navigate to the appropriate directory and execute the file using the respective language's command.
You can add test cases to the main function or use testing frameworks like unittest for Python, testing for Go, jest for JavaScript, and jest for TypeScript.
- Create a new file in the appropriate directory (
golang/,python/,javascript/, ortypescript/). - Implement the solution for the LeetCode problem.
- Add test cases to the main function or a separate test file.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.
For any questions or suggestions, please open an issue in the repository.
This project is actively maintained and updated with new solutions.
- 1.0.0
- Initial release with solutions to the top 150 LeetCode questions.