We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3335a8 commit 9d38d68Copy full SHA for 9d38d68
14.longest-common-prefix.js
@@ -21,7 +21,7 @@ var longestCommonPrefix = function(strs) {
21
// 时间复杂度O(m) 空间复杂度O(m * n)
22
23
// tag: 二分法
24
- // 时间复杂度 O(n*logm*logm) 空间复杂度O(1)
+ // 时间复杂度 O(n*logm) 空间复杂度O(1)
25
if (strs.length === 0) return "";
26
if (strs.length === 1) return strs[0];
27
0 commit comments