Skip to content

Commit 5b3fa69

Browse files
authored
Update match-substring-after-replacement.cpp
1 parent b788f03 commit 5b3fa69

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

C++/match-substring-after-replacement.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Time: O(n * s)
2-
// Space: O(m)
1+
// Time: O(n * k), n = len(s), k = len(sub)
2+
// Space: O(m), m = len(mappings)
33

44
// brute force
55
class Solution {
@@ -31,8 +31,8 @@ class Solution {
3131
}
3232
};
3333

34-
// Time: O(n * s)
35-
// Space: O(m)
34+
// Time: O(n * k), n = len(s), k = len(sub)
35+
// Space: O(m), m = len(mappings)
3636
// brute force
3737
class Solution2 {
3838
public:

0 commit comments

Comments
 (0)