Skip to content

Files

Latest commit

 

History

History

010. Regular Expression Matching

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
Implement regular expression matching with support for '.' and '*'.
实现正则匹配中的*和.
用的递归算法,考虑遇到*号时,分为匹配1个字母和
不匹配任何字母两种情况。没有*号则判断是否当前字母
匹配,返回去掉首字母的字符串的匹配情况。
但是递归算法明显慢于动态规划算法,用矩阵去保存子串
的匹配情况更快。