This repository contains my solutions to LeetCode problems in JavaScript and Java.
The repository is organized as follows:
JavaScript/
: Contains JavaScript solutions to LeetCode problems.src/
: Contains the source code files.tests/
: Contains the test files.
Java/
: Contains Java solutions to LeetCode problems.src/
: Contains the source code files.tests/
: Contains the test files.
To run the JavaScript solutions:
- Make sure you have Node.js installed.
- Clone this repository:
git clone https://github.com/your-username/leetcode-solutions.git
- Navigate to the JavaScript folder:
cd leetcode-solutions/JavaScript
- Install dependencies:
npm install
- Run the tests:
npm test
To run the Java solutions:
- Make sure you have Java and JUnit installed.
- Clone this repository:
git clone https://github.com/your-username/leetcode-solutions.git
- Navigate to the Java folder:
cd leetcode-solutions/Java
- Compile the source files:
javac -d out src/*.java
- Run the tests:
java -cp out org.junit.runner.JUnitCore tests/*.java
Feel free to explore the solutions and test files to understand the implementation and test cases for each problem.
If you have any suggestions or improvements for the solutions, feel free to submit a pull request. Contributions are always welcome!