LCS, using recursion and dp