Skip to content

Commit 803157a

Browse files
authored
Update longest-common-prefix.md
1 parent 3585d12 commit 803157a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: articles/longest-common-prefix.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Solution {
8383
### Time & Space Complexity
8484

8585
* Time complexity: $O(n * m)$
86-
* Space complexity: $O(n)$
86+
* Space complexity: $O(1)$
8787

8888
> Where $n$ is the length of the shortest string and $m$ is the number of strings.
8989

@@ -500,4 +500,4 @@ class Solution {
500500
* Time complexity: $O(n * m)$
501501
* Space complexity: $O(n)$
502502

503-
> Where $n$ is the length of the shortest string and $m$ is the number of strings.
503+
> Where $n$ is the length of the shortest string and $m$ is the number of strings.

0 commit comments

Comments
 (0)