LCS Returns | HackerRank

Find the total number of ways to insert a character in a string such that the length of the longest common subsequence of two strings increases by one.