Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3585d12 commit 803157aCopy full SHA for 803157a
articles/longest-common-prefix.md
@@ -83,7 +83,7 @@ class Solution {
83
### Time & Space Complexity
84
85
* Time complexity: $O(n * m)$
86
-* Space complexity: $O(n)$
+* Space complexity: $O(1)$
87
88
> Where $n$ is the length of the shortest string and $m$ is the number of strings.
89
@@ -500,4 +500,4 @@ class Solution {
500
501
* Space complexity: $O(n)$
502
503
-> Where $n$ is the length of the shortest string and $m$ is the number of strings.
+> Where $n$ is the length of the shortest string and $m$ is the number of strings.
0 commit comments