同后台修改

This commit is contained in:
2024-11-06 16:38:46 +08:00
parent 898b4b8128
commit 266195ec26

View File

@ -370,8 +370,8 @@
} }
//如果前面部分都对得上,但是长度不同,则差异是长度 //如果前面部分都对得上,但是长度不同,则差异是长度
if(difference == 0 && str1.length != str2.length){ if(str1.length != str2.length){
difference = Math.abs(str1.length - str2.length) difference += Math.abs(str1.length - str2.length)
} }
// 同样遍历字符串2处理字符串1中不存在的字符 // 同样遍历字符串2处理字符串1中不存在的字符
/*for (let i = 0; i < str2.length; i++) { /*for (let i = 0; i < str2.length; i++) {