Added purely functional DP solution for LCS problem