A collection of solutions to dynamic programming problems written in Java, cuz why not? DP problems are fun.
- Java 8+
- sbt (optional)
The project uses sbt so a simple sbt clean compile test
on the command-line in the project folder will compile the source and run the unit tests. (For the usage of a solution to a particular problem, you can check out the problem's test file in src/test/java
.)
- Avoid Roads
- Bad Neighbours
- Balanced Parantheses
- Balanced Subsequences
- Chess Metric
- Coin Change
- Decode Ways
- Fibonacci
- Fibonacci Modified
- Flower Garden
- Jewelry
- Largest Independent Set
- Longest Balanced Subsequence
- Longest Increasing Subsequence
- Longest Unique Substring
- Longest Zig-Zag Sequence
- Maximum Subarray Sum
- Minimum Change
- Minumum Edit Distance
- Palindrome Subsequences
- Red John's Murder Puzzle
- Stock Maximize
- Subarray Sum
- Unbounded Knapsack