Solution in C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minDistance(string word1, string word2) {\n        int n1 = word1.size();\n        int n2 = word2.size(); \n        vector<vector<int>> dp(n1, vector<int>(n2, -1));\n        return helper(n1-1, n2-1, word1, word2, dp);\n    }\n\n    int helper(int i, int j, string &s1, string &s2,vector<vector<int>> &dp){\n        if(i < 0){\n            return j+1;\n        }\n        if(j < 0){\n            return i+1;\n        }\n        if(s1[i] ==  s2[j]){\n            return dp[i][j] = helper(i-1, j-1, s1, s2, dp);\n        }\n        if(dp[i][j] != -1){\n            return dp[i][j];\n        }\n        int min1 = helper(i-1, j, s1, s2, dp);\n        int min2 = helper(i, j-1, s1, s2, dp);\n        int min3 = helper(i-1, j-1, s1, s2, dp);\n        return dp[i][j] = 1 + min(min(min1, min2), min3);\n    }\n};\n```
['C++']