A structured collection of daily Data Structures and Algorithms (DSA) problem solutions from LeetCode and GeeksforGeeks, implemented in Java with comprehensive JUnit tests. This repository serves as a personal archive for consistent coding practice and skill development.
- Categorized Solutions: Problems organized by topic and algorithmic pattern
- Comprehensive Testing: Each solution includes unit tests for validation
- Maven Build System: Easy dependency management and testing
- Daily Practice Tracking: Consistent problem-solving routine
dsa-problem-of-the-day/
├── src/
│ ├── main/java/
│ │ ├── Arrays/
│ │ │ ├── ChocolateDistribution.java
│ │ │ ├── Prefix/
│ │ │ │ └── MaximumNumberOfOverlappingIntervals.java
│ │ │ ├── SlidingWindow/
│ │ │ │ ├── LongestSubarrayWithAtmostTwoDistinct.java
│ │ │ │ └── LongestSubstringWithKUniques.java
│ │ │ └── Sorting/
│ │ │ └── InversionCount.java
│ │ └── DynamicProgramming/
│ │ ├── _2D/
│ │ │ └── LongestArithmeticSubsequence.java
│ │ └── TwoD/
│ │ └── LongestArithmeticSubsequence.java
│ └── test/java/
│ └── [Corresponding test files]
├── pom.xml
└── README.md
- Language: Java 17
- Build Tool: Maven
- Testing Framework: JUnit 5
- Version Control: Git
- Arrays: Basic operations, prefix sums, sorting algorithms
- Sliding Window: Efficient subarray/substring problems
- Dynamic Programming: 2D DP problems like longest arithmetic subsequences
- Sorting: Inversion counting and related algorithms
- Java 17 or higher
- Maven 3.6+
-
Clone the repository:
git clone https://github.com/prasanthcp/dsa-problem-of-the-day.git cd dsa-problem-of-the-day -
Build the project:
mvn clean compile
-
Run tests:
mvn test -
Run a specific test:
mvn test -Dtest=ChocolateDistributionTest
- Solve at least one problem daily
- Master various algorithmic techniques
- Build a comprehensive problem-solving toolkit
- Maintain clean, tested, and documented code
This is a personal learning repository, but feel free to:
- Suggest improvements
- Report bugs
- Share better solutions
[Platform][Topic] Problem Name
Examples:
[LeetCode][Arrays] Chocolate Distribution[GFG][Dynamic Programming] Longest Arithmetic Subsequence
This project is for educational purposes. Solutions are implemented based on problem statements from respective platforms.