Bottom Up DP

Bottom up DP is a way to optimize solution to O(mn)O(mn) complexity.