Edit Distance can also be addressed using a recursive approach. The fundamental concept mirrors that of dynamic programming, but the key distinction lies in how subproblem solutions are stored and reused. For two strings, s1 and s2, our objective is to calculate the edit distance DP[i][j] , where i and j represent the lengths of s1 and s2, respectively. We can consider three possible operations: If the last characters are identical, we can disregard them and calculate the count for the remaining substrings. Thus, DP[i][j] = DP[i-1][j-1] . If the last characters differ, we remove the last character from one of the strings and recursively compute the edit distance. The minimum of these three operations, plus 1, will give us our answer. DP[i][j] = min(DP[i][j - 1], # Remove from s1 DP[i - 1][j], # Remove from s2 DP[i - 1][j - 1]) # Replace in s1 or s2 This recursive method results in overlapping subproblems, so we can use a memoization technique to store the results of these subproblems for later reuse.