未验证 提交 45e24a81 编写于 作者: 【张鑫】 提交者: GitHub

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

原文中的校验,存在边界问题,当 String[] strs = {};或者 String[] strs = null;时仍然会报错。
上级 47776dbf
......@@ -144,6 +144,7 @@ public class Main {
flag = true;
} else {
flag = false;
break;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册