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

Commitbf5752b

Browse files
Fix runtime for backtracking
1 parentf7e4aae commitbf5752b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎articles/search-for-word-ii.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ class Solution {
341341

342342
###Time & Space Complexity
343343

344-
- Time complexity: $O(m * n * 4 ^ t+ s)$
344+
- Time complexity: $O(w *m * n * 4* 3^ t- 1)$
345345
- Space complexity: $O(t)$
346346

347-
>Where $m$ is the number of rows, $n$ is the number of columns,$t$ is the maximum length of any word in the array $words$ and $s$ is the sum of the lengths of all the words.
347+
>Where $w$ is the number of words, $m$ is the number of rows, $n$ is the number of columns and$t$ is the maximum length of any word in the array $words$.
348348
349349
---
350350

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp