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.