Skip to content

maikelsalazar/leetcode-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions in Java

This repository contains Java solutions to selected problems.

Structure

Each problem is placed in its own package.

Solved Problems

Title Solution Test Notes
Anagram Checker AnagramChecker.java AnagramCheckerTest.java Case-insensitive comparison using HashMap
Group Anagrams GroupAnagrams.java GroupAnagramsTest.java Solved using sorting and character counting
Product of Array Except Self ProductOfArrayExceptSelf.java ProductOfArrayExceptSelfTest.java Brute-force and optimized prefix/suffix product approach
String To Integer (atoi) StringToIntAtoi.java StringToIntAtoiTest.java Solved without using exceptions; null → NullPointerException.
Top K Frequent Elements TopKFrequentElements.java TopKFrequentElementsTest.java Solved using heap-based (PriorityQueue) and bucket sort approaches
Two Sum TwoSumHashMap.java, TwoSumBruteForce.java TwoSumHashMapTest.java, TwoSumBruteForceTest.java Solved using HashMap and brute-force approaches

Testing

  1. Make sure you have JDK 17+ and Maven installed.
  2. Clone the repository:
git clone https://github.com/maikelsalazar/leetcode-java.git
cd leetcode-java
  1. Run the tests:
mvn test

About

LeetCode solutions in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages