1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-25 02:27:10 +08:00

最长公共前缀题目数组检测函数修复

原文中的校验,存在边界问题,当 String[] strs = {};或者 String[] strs = null;时仍然会报错。
This commit is contained in:
【张鑫】 2019-07-25 14:51:09 +08:00 committed by GitHub
parent 47776dbf46
commit 45e24a816e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,6 +144,7 @@ public class Main {
flag = true;
} else {
flag = false;
break;
}
}
}