Dynamic programming Logic bottom to up
Dynamic programming:\n\nclass Solution:\n    def minDistance(self, s: str, t: str) -> int:\n        dp=[[0]*(len(t)+1) for i in range(len(s)+1)]\n        for k 
# Dynamic programming:\n```\nclass Solution:\n    def minDistance(self, s: str, t: str) -> int:\n        dp=[[0]*(len(t)+1) for i in range(len(s)+1)]\n        for k in range(len(s)+1):\n            dp[k][len(t)]=len(s)-k\n        for k in range(len(t)+1):\n            dp[len(s)][k]=len(t)-k\n        for i in range(len(s)-1,-1,-1):\n            for j in range(len(t)-1,-1,-1):\n                if s[i]==t[j]:\n                    dp[i][j]=dp[i+1][j+1]\n                else:\n                    dp[i][j]=1+min(dp[i+1][j+1],dp[i+1][j],dp[i][j+1])\n        return dp[0][0]        \t\t\n```\n# please upvote me it would encourage me alot\n
['Dynamic Programming']