A Java/Maven project for practising classic algorithm and data-structure problems from LeetCode. Every problem has a clean solution class, Javadoc, and at least one JUnit 5 test.
Portfolio note: This repository is part of Martin's public portfolio. For a broader overview of projects and skills see
docs/portfolio-summary.md.
| # | Title | Difficulty | Key Concept |
|---|---|---|---|
| 1 | Two Sum | Easy | Hash Map |
| 3 | Longest Substring Without Repeating Characters | Medium | Sliding Window |
| 4 | Median of Two Sorted Arrays | Hard | Merge + Sort |
| 149 | Max Points on a Line | Hard | Slope / Hash Map |
| 1437 | Check If All 1's Are at Least K Places Away | Easy | Linear Scan |
| Tool | Version |
|---|---|
| Java | 11+ |
| Maven | 3.6+ |
| JUnit 5 | 5.9.3 |
leetcode2025/
├── src/
│ ├── main/java/
│ │ ├── Main.java # Interactive solution runner
│ │ └── Problem/ # One class per LeetCode problem
│ └── test/java/Test/ # JUnit 5 test classes
├── docs/ # Documentation and portfolio notes
│ ├── portfolio-summary.md # Recruiter-friendly project overview
│ └── gropro-project.md # GroPro MATSE thesis overview
├── pom.xml
└── README.md
- Java 11 or higher
- Maven 3.6 or higher
mvn clean compilemvn exec:java -Dexec.mainClass="Main"mvn testmvn test -Dtest=TwoSumTestEach problem class has a corresponding test class in src/test/java/Test/.
Tests use JUnit 5 and cover the example inputs from the LeetCode problem statement
as well as edge cases (negatives, large values, boundary conditions).
src/test/java/Test/
├── TwoSumTest.java
├── LongestSubstringTest.java
├── Median2SortedArraysTest.java
├── MaxPointsOnLineTest.java
└── CheckBinaryListDistanceTest.java
- Create
src/main/java/Problem/ProblemName.javawith Javadoc and the solution. - Create
src/test/java/Test/ProblemNameTest.javawith at least the provided examples as tests. - Register the problem in
Main.javaso it can be run interactively.
Built by Martin as part of a continuous algorithm practice routine and as a portfolio demonstration of clean Java code, test-driven development, and problem-solving skills.
See also: GroPro Project — MATSE Thesis