Update 0583.两个字符串的删除操作.md

更正语法规范
This commit is contained in:
wang2jun
2022-07-06 11:13:36 +08:00
committed by GitHub
parent ca6f2045b8
commit 2b68bee8f5

View File

@ -205,7 +205,7 @@ func min(a, b int) int {
Javascript Javascript
```javascript ```javascript
const minDistance = (word1, word2) => { const minDistance = (word1, word2) => {
let dp = Array.from(Array(word1.length + 1), () => Array(word2.length+1).fill(0)); let dp = Array.from(new Array(word1.length + 1), () => Array(word2.length+1).fill(0));
for(let i = 1; i <= word1.length; i++) { for(let i = 1; i <= word1.length; i++) {
dp[i][0] = i; dp[i][0] = i;