Skip to content

About

some Leetcode Problems for fun

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode 2025 — Algorithm Practice

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.


Solved Problems

# 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

Tech Stack

Tool Version
Java 11+
Maven 3.6+
JUnit 5 5.9.3

Project Structure

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

Usage

Prerequisites

  • Java 11 or higher
  • Maven 3.6 or higher

Build

mvn clean compile

Run the interactive solution runner

mvn exec:java -Dexec.mainClass="Main"

Run all tests

mvn test

Run a specific test

mvn test -Dtest=TwoSumTest

Testing

Each 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

Adding a New Problem

  1. Create src/main/java/Problem/ProblemName.java with Javadoc and the solution.
  2. Create src/test/java/Test/ProblemNameTest.java with at least the provided examples as tests.
  3. Register the problem in Main.java so it can be run interactively.

About

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

About

some Leetcode Problems for fun

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages