Add another O(mxm) time/space DP solution.