This repository contains Java implementations of the problems from the NeetCode 150 β a curated list of 150 essential data structures and algorithms problems.
The goal is to provide clear, well-documented, and efficient solutions for each proble
NeetCode 150 is a popular set of coding interview questions covering a wide range of topics including:
- Arrays
- Linked Lists
- Trees
- Hash Maps
- Graphs
- Dynamic Programming
- Heaps
- Tries
- Backtracking
- Sliding Window
This project provides:
- β Java solutions for each problem
- π Explanations and inline comments
- π§ͺ Unit tests for correctness
neetcode150/
βββ pom.xml # Maven configuration
βββ src/
β βββ main/
β β βββ java/
β β βββ com/neetcode/
β β βββ App.java # Main application (entry point)
β βββ test/
β β βββ java/
β β βββ com/neetcode/
β β βββ AppTest.java # Unit tests
β βββ README.md # Project documentation
βββ target/ # Compiled files (auto-generated)
- Java 8 or higher
- Maven
-
Clone the repository:
git clone https://github.com/Falasefemi2/neetcode150.git cd neetcode150 -
Compile the project:
mvn compile
-
Run tests:
mvn test -
Run the main application (if applicable):
mvn exec:java -Dexec.mainClass="com.neetcode.App"
- Add your solution in the appropriate package under
src/main/java/com/neetcode/. - Write corresponding unit tests in
src/test/java/com/neetcode/.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name - Add your solution and tests.
- Commit your changes:
git commit -m "Add solution for [problem name]" - Push to your fork:
git push origin feature/your-feature-name - Open a pull request.
This project is licensed under the MIT License. See LICENSE for details.
- NeetCode for the problem list and explanations.
- Java and open-source community for tools and libraries.