Skip to content

Fix runtime for backtracking #4663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions articles/search-for-word-ii.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ class Solution {

### Time & Space Complexity

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

> 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.
> 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$.

---

Expand Down
Loading