#include <leetcode.h>
|
static bool | dfs (const string &s, const string &p, int si, int pi) |
|
static bool | isMatch (const string &s, const string &p) |
|
◆ dfs()
bool leetcode::regular_expression_matching::Solution::dfs |
( |
const string & |
s, |
|
|
const string & |
p, |
|
|
int |
si, |
|
|
int |
pi |
|
) |
| |
|
static |
在文件 leetcode.cpp 第 8411 行定义.
8412 if(pi == p.length() && si == s.length()) {
8415 if(pi == p.length()) {
8418 const char c = p[pi++];
8419 bool multiple =
false;
8420 if(pi < p.length() && p[pi] ==
'*') {
8425 if(si == s.length()) {
8428 if(c ==
'.' || s[si] == c) {
8429 return dfs(s, p, si + 1, pi);
8434 for(
int i = si; i <= s.length(); i++) {
8435 if(
dfs(s, p, i, pi)) {
8443 if(
dfs(s, p, ++i, pi)) {
8447 return dfs(s, p, si, pi);
static bool dfs(const string &s, const string &p, int si, int pi)
引用了 dfs().
被这些函数引用 dfs() , 以及 isMatch().
◆ isMatch()
bool leetcode::regular_expression_matching::Solution::isMatch |
( |
const string & |
s, |
|
|
const string & |
p |
|
) |
| |
|
static |
该类的文档由以下文件生成: