Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ascoders committed Jul 31, 2023
1 parent 77273b3 commit c30a1b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 算法/283.精读《算法题 - 通配符匹配》.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

加上 `'*'` 号时该题成为 hard 的第一个原因。由于 `'*'` 可以匹配空字符,也可以匹配任意多个字符,所以遇到 `p``'*'` 时有三种处理可能性:

1. 当做没见过 `'*'`,直接判等,不消耗 `s`,并匹配 `p` 的下一个字符。此时对应 `'p'` 不匹配任何字符。
1. 当做没见过 `'*'`,直接判等,不消耗 `s`,并匹配 `p` 的下一个字符。此时对应 `'*'` 不匹配任何字符。
2. 直接消耗掉 `'*'` 判等,同时消耗 `s``p`。此时 `'*'``'?'` 的作用等价。
3. 不消耗 `'*'`,但是消耗 `s`。此时对应 `'*'` 匹配多个字符而可以不消耗自己的特性。

Expand Down

0 comments on commit c30a1b2

Please sign in to comment.