This repository contains my solutions to various LeetCode problems. The solutions are implemented in both Java and JavaScript. The Java solutions are located in the Java/src/
directory, while the JavaScript solutions are divided into problem implementations in js/Problems/
and corresponding Jest test cases in js/Tests/
.
Here is a list of the problems I've solved along with links to the corresponding LeetCode problem:
The Java/src/
directory contains my Java implementations for LeetCode problems. Each problem is implemented in its own Java file and test file.
Java is build ontop of a Maven project for easier testing and in general structure.
The JavaScript solutions are divided into two parts:
-
Problem Implementations: The JavaScript problem implementations are located in the
js/Problems/
directory. Each problem is implemented in its own JavaScript file. -
Jest Test Cases: The corresponding Jest test cases for the JavaScript problems are located in the
js/Tests/
directory. Each problem has its own test file that ensures the correctness of the implementation.
-
Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/PalmaAnd/Programming-Problems.git
-
Navigate to the Directory: Change into the repository directory:
cd Programming-Problems
-
Select a Solution: Navigate to the directory of the specific problem you're interested in. For Java solutions, navigate to
Java/src/
. For JavaScript solutions, navigate tojs/Problems/
.
-
Install Dependencies: Before running the tests, make sure you have Node.js and npm installed on your machine. Then, navigate to the project's root directory and install the required dependencies:
npm install
-
Run Tests: To run the Jest tests for the JavaScript solutions, navigate to the
js/Tests/
directory and execute the following command:npm test
This command will run all the test cases and display the results.
This project is licensed under the MIT License.