- This is a repository for the LeetCode Top Interview Questions
- The repository contains the solutions to the problems in Typescript.
- The problems are divided into different categories such as Easy, Medium, and Hard.
-
The most efficient solutions to the problems.
-
Notable comments for the solutions.
-
Up to 5 Unit tests for the solutions using Ava.
-
Two solutions for each problem.
- The first solution is the most efficient solution in time complexity.
- The second solution is the most efficient solution in space complexity.
To run the project, you need to have Node.js installed on your machine.
- You can download it from here.
You can install the project by following the steps below:
# Clone the repository
git clone https://github.com/Yuzu02/Leetcode-Top-Interview
# Enter into the directory
cd Leetcode-Top-Interview
# Install the dependencies using ur preferred package manager
npm install
# or
yarn install
# or
pnpm install
# or
bun install
# Open the project in VSCode
code .
This project is a collection of solutions to the LeetCode Top Interview Questions divide into different categories.
-
-
Linked-List
-
Tree
-
Sorting-and-Searching
-
Dynamic-Programming
-
Design
-
Math
-
Others
-
Medium-Collection
- As soon as I solve the problems, I will update the repo with the solutions.
-
Hard-Collection
- As soon as I solve the problems, I will update the repo with the solutions.
You can run the tests for the solutions by running the following command:
# test# means the test file you want to run based on the number of the problem, e.g. test1, test2, test3, etc.
npm test#
# or
yarn test#
# or
pnpm test#
# Example 1
yarn test125
# Example 2
pnpm test189
# Example 3
npm run test217
# Example 4
bun run test344
If you want to contribute to this project using ur own solutions and tests, you can follow the steps below:
- Fork the project
- Create a new branch
- Make your changes and commit them
- Push to the branch
- Create a new pull request
This project is licensed under the MIT License - see the LICENSE file for details.