http://oj.leetcode.com/problems/regular-expression-matching/
问题给想复杂了,只有p中可以含有. *,s中的字符都是确定的。想了好久,最终还是参考了网上的答案。等我再想想。
#include <iostream> #include <map> #include <string> using namespace std; class Solution { public: bool isMatch(const char *s, const char *p) { if (s == NULL || p == NULL) return false; if (*p == '