Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit803157a

Browse files
authored
Update longest-common-prefix.md
1 parent3585d12 commit803157a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎articles/longest-common-prefix.md

Lines changed: 2 additions & 2 deletions
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 stringand $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)

[8]ページ先頭

©2009-2025 Movatter.jp