You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: markdowns/Medium.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@
154
154
| 781 |[Rabbits in Forest](<https://leetcode.com/problems/rabbits-in-forest>)| Medium | Daily |[solution](<_781. Rabbits in Forest.md>)| py | Apr 21, 2025 |
155
155
| 784 |[Letter Case Permutation](<https://leetcode.com/problems/letter-case-permutation>)| Medium ||[solution](<_784. Letter Case Permutation.md>)| py | Jun 15, 2024 |
156
156
| 791 |[Custom Sort String](<https://leetcode.com/problems/custom-sort-string>)| Medium ||[solution](<_791. Custom Sort String.md>)| java | Jun 24, 2024 |
157
-
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<_792. Number of Matching Subsequences.md>)| py | Aug 26, 2025 |
157
+
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<_792. Number of Matching Subsequences.md>)| py | Aug 27, 2025 |
| 797 |[All Paths From Source to Target](<https://leetcode.com/problems/all-paths-from-source-to-target>)| Medium ||[solution](<_797. All Paths From Source to Target.md>)| py | Mar 05, 2025 |
160
160
| 807 |[Max Increase to Keep City Skyline](<https://leetcode.com/problems/max-increase-to-keep-city-skyline>)| Medium ||[solution](<_807. Max Increase to Keep City Skyline.md>)| java | Jun 22, 2024 |
Copy file name to clipboardExpand all lines: markdowns/Questions_By_Code_Length.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ Calculations are based on the code files's byte sizes.
39
39
| 431 |[Encode N-ary Tree to Binary Tree](<https://leetcode.com/problems/encode-n-ary-tree-to-binary-tree>)| Hard ||[solution](<_431. Encode N-ary Tree to Binary Tree.md>)| java, py | Jun 28, 2024 |
| 224 |[Basic Calculator](<https://leetcode.com/problems/basic-calculator>)| Hard ||[solution](<_224. Basic Calculator.md>)| py | Jun 10, 2024 |
42
+
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<_792. Number of Matching Subsequences.md>)| py | Aug 27, 2025 |
42
43
| 19 |[Remove Nth Node From End of List](<https://leetcode.com/problems/remove-nth-node-from-end-of-list>)| Medium | B75, N150 |[solution](<_19. Remove Nth Node From End of List.md>)| c, java, py | Jun 07, 2024 |
43
44
| 114 |[Flatten Binary Tree to Linked List](<https://leetcode.com/problems/flatten-binary-tree-to-linked-list>)| Medium ||[solution](<_114. Flatten Binary Tree to Linked List.md>)| c, py | Jun 11, 2024 |
44
45
| 987 |[Vertical Order Traversal of a Binary Tree](<https://leetcode.com/problems/vertical-order-traversal-of-a-binary-tree>)| Hard ||[solution](<_987. Vertical Order Traversal of a Binary Tree.md>)| py | Jun 12, 2024 |
@@ -98,7 +99,6 @@ Calculations are based on the code files's byte sizes.
98
99
| 1368 |[Minimum Cost to Make at Least One Valid Path in a Grid](<https://leetcode.com/problems/minimum-cost-to-make-at-least-one-valid-path-in-a-grid>)| Hard | Daily |[solution](<_1368. Minimum Cost to Make at Least One Valid Path in a Grid.md>)| py | Jan 18, 2025 |
99
100
| 1609 |[Even Odd Tree](<https://leetcode.com/problems/even-odd-tree>)| Medium ||[solution](<_1609. Even Odd Tree.md>)| py | Jul 05, 2024 |
100
101
| 13 |[Roman to Integer](<https://leetcode.com/problems/roman-to-integer>)| Easy ||[solution](<_13. Roman to Integer.md>)| py | Jul 31, 2024 |
101
-
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<_792. Number of Matching Subsequences.md>)| py | Aug 26, 2025 |
102
102
| 2493 |[Divide Nodes Into the Maximum Number of Groups](<https://leetcode.com/problems/divide-nodes-into-the-maximum-number-of-groups>)| Hard | Daily |[solution](<_2493. Divide Nodes Into the Maximum Number of Groups.md>)| py | Jan 30, 2025 |
103
103
| 437 |[Path Sum III](<https://leetcode.com/problems/path-sum-iii>)| Medium ||[solution](<_437. Path Sum III.md>)| py | Jul 03, 2024 |
104
104
| 616 |[Add Bold Tag in String](<https://leetcode.com/problems/add-bold-tag-in-string>)| Medium ||[solution](<_616. Add Bold Tag in String.md>)| py | Jun 28, 2024 |
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<_792. Number of Matching Subsequences.md>)| py | Aug 26, 2025 |
9
+
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<_792. Number of Matching Subsequences.md>)| py | Aug 27, 2025 |
10
10
| 1198 |[Find Smallest Common Element in All Rows](<https://leetcode.com/problems/find-smallest-common-element-in-all-rows>)| Medium ||[solution](<_1198. Find Smallest Common Element in All Rows.md>)| py | Aug 26, 2025 |
11
11
| 3000 |[Maximum Area of Longest Diagonal Rectangle](<https://leetcode.com/problems/maximum-area-of-longest-diagonal-rectangle>)| Easy | Daily |[solution](<_3000. Maximum Area of Longest Diagonal Rectangle.md>)| py | Aug 26, 2025 |
12
12
| 498 |[Diagonal Traverse](<https://leetcode.com/problems/diagonal-traverse>)| Medium | Daily |[solution](<_498. Diagonal Traverse.md>)| go, py | Aug 25, 2025 |
Copy file name to clipboardExpand all lines: markdowns/_792. Number of Matching Subsequences.md
+65-11Lines changed: 65 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,9 @@
6
6
7
7
------
8
8
9
-
> *First completed : August 26, 2025*
9
+
> *First completed : August 27, 2025*
10
10
>
11
-
> *Last updated : August 26, 2025*
11
+
> *Last updated : August 27, 2025*
12
12
13
13
------
14
14
@@ -18,11 +18,28 @@
18
18
19
19
------
20
20
21
+
> ## V1 DFS Parallel Index Tracking
22
+
>
23
+
> Indexes the indices of each character in `s` and creates a trie of
24
+
> all potential subsequence words. Then, performs a DFS on the subsequence word trie while tracking the "last used index" of each character to see if each is valid.
25
+
>
26
+
> Runtime: $O(s+w*v*s)$ where $s$ is the length of input string `s` and $w$ is the number of subsequence candidates in `words` and $v$ is the longest candidate in `words`.
27
+
>
28
+
> ## V2 Trie-Merging Recursion
29
+
>
30
+
> Converts potential subsequence word targets into a trie then iterates through each character of `s`. At each character `c`, if it's in the trie, we remove it and merge the subtrie into the main trie root. That is, we merge `trie[c]` into the root `trie` and recursively merge the branches. We use `trie['.']` to track how many word "endings" we have. Since we're systematically eliminating letters and summing `trie['.']` we return `'.'` which is our counter.
31
+
>
32
+
> Runtime: $O(s)$ where $s$ is the length of the input string `s`.
33
+
>
34
+
35
+
------
36
+
21
37
## Solutions
22
38
23
-
-[m792 v1.py](<../my-submissions/m792 v1.py>)
39
+
-[m792 v1 dfs parallel index tracking.py](<../my-submissions/m792 v1 dfs parallel index tracking.py>)
| 758 |[Bold Words in String](<https://leetcode.com/problems/bold-words-in-string>)| Medium ||[solution](<../_758. Bold Words in String.md>)| py | Jun 28, 2024 |
102
102
| 781 |[Rabbits in Forest](<https://leetcode.com/problems/rabbits-in-forest>)| Medium | Daily |[solution](<../_781. Rabbits in Forest.md>)| py | Apr 21, 2025 |
103
-
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<../_792. Number of Matching Subsequences.md>)| py | Aug 26, 2025 |
103
+
| 792 |[Number of Matching Subsequences](<https://leetcode.com/problems/number-of-matching-subsequences>)| Medium ||[solution](<../_792. Number of Matching Subsequences.md>)| py | Aug 27, 2025 |
| 807 |[Max Increase to Keep City Skyline](<https://leetcode.com/problems/max-increase-to-keep-city-skyline>)| Medium ||[solution](<../_807. Max Increase to Keep City Skyline.md>)| java | Jun 22, 2024 |
106
106
| 817 |[Linked List Components](<https://leetcode.com/problems/linked-list-components>)| Medium ||[solution](<../_817. Linked List Components.md>)| java | Jul 04, 2024 |
0 commit comments