Implemented LCS cpp and backtracking