Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrrezoo/leetcode-top-interview-150
https://github.com/mrrezoo/leetcode-top-interview-150
Last synced: about 14 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrrezoo/leetcode-top-interview-150
- Owner: MrRezoo
- Created: 2024-08-06T14:01:14.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T16:41:56.000Z (about 2 months ago)
- Last Synced: 2024-09-15T12:25:21.242Z (about 2 months ago)
- Language: Python
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [LeetCode Top 150 Questions Solutions](https://leetcode.com/studyplan/top-interview-150/)
This project contains solutions to the top 150 LeetCode interview questions, implemented in Python, Go, JavaScript, and TypeScript.
## Project Structure
- `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.## Table of Contents
1. [Installation](#installation)
- [Go](#go)
- [Python](#python)
- [JavaScript](#javascript)
- [TypeScript](#typescript)
2. [Usage](#usage)
- [Example](#example)
- [Running the Solutions](#running-the-solutions)
- [Testing the Solutions](#testing-the-solutions)
- [Adding New Solutions](#adding-new-solutions)
3. [Contributing](#contributing)
4. [License](#license)
5. [Contact](#contact)
6. [References](#references)
7. [Project Status](#project-status)
8. [Release History](#release-history)
9. [Author](#author)
10. [Contributors](#contributors)## Installation
### Go
1. Ensure you have Go installed. You can download it from [here](https://golang.org/dl/).
2. Clone the repository:
```sh
git clone https://github.com/yourusername/leetcode-top-150.git
cd leetcode-top-150/golang
```
3. Run the Go files:
```sh
go run .go
```### Python
1. Ensure you have Python installed. You can download it from [here](https://www.python.org/downloads/).
2. Clone the repository:
```sh
git clone https://github.com/yourusername/leetcode-top-150.git
cd leetcode-top-150/python
```
3. Run the Python files:
```sh
python .py
```### JavaScript
1. Ensure you have Node.js installed. You can download it from [here](https://nodejs.org/).
2. Clone the repository:
```sh
git clone https://github.com/yourusername/leetcode-top-150.git
cd leetcode-top-150/javascript
```
3. Run the JavaScript files:
```sh
node .js
```### TypeScript
1. Ensure you have Node.js and TypeScript installed. You can download Node.js from [here](https://nodejs.org/) and install TypeScript globally using:
```sh
npm install -g typescript
```
2. Clone the repository:
```sh
git clone https://github.com/yourusername/leetcode-top-150.git
cd leetcode-top-150/typescript
```
3. Compile and run the TypeScript files:
```sh
tsc .ts
node .js
```## Usage
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.
### Example
To run the `is-subsequence` solution in Go:
```sh
cd golang/two-pointer
go run is-subsequence.go
```To run the `is-subsequence` solution in Python:
```sh
cd python/two-pointer
python is-subsequence.py
```To run the `is-subsequence` solution in JavaScript:
```sh
cd javascript/two-pointer
node is-subsequence.js
```To run the `is-subsequence` solution in TypeScript:
```sh
cd typescript/two-pointer
tsc is-subsequence.ts
node is-subsequence.js
```### Running the Solutions
To run any solution, navigate to the appropriate directory and execute the file using the respective language's command.
### Testing the Solutions
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.
### Adding New Solutions
1. Create a new file in the appropriate directory (`golang/`, `python/`, `javascript/`, or `typescript/`).
2. Implement the solution for the LeetCode problem.
3. Add test cases to the main function or a separate test file.## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
## License
This project is licensed under the MIT License.
## Contact
For any questions or suggestions, please open an issue in the repository.
## References
- [LeetCode](https://leetcode.com/)
- [Go Documentation](https://golang.org/doc/)
- [Python Documentation](https://docs.python.org/3/)
- [JavaScript Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
- [TypeScript Documentation](https://www.typescriptlang.org/docs/)## Project Status
This project is actively maintained and updated with new solutions.
## Release History
- 1.0.0
- Initial release with solutions to the top 150 LeetCode questions.## Author
- [Reza Mobaraki](https://github.com/MrRezoo)
## Contributors
- [Mary Ostovar](https://github.com/maryOstovar)