003.Longest Substring Without Repeating Characters
004.median of two sorted arrays
005.Longest Palindromic Substring
008.String to Integer (atoi)
010. Regular Expression Matching
011. Container With Most Water
014. Longest Common Prefix
017. Letter Combinations of a Phone Number
019. Remove Nth Node From End of List
021. Merge Two Sorted Lists
022. Generate Parentheses
023. Merge k Sorted Lists
025. Reverse Nodes in k-Group
026. Remove Duplicates from Sorted Array
030. Substring with Concatenation of All Words
032. Longest Valid Parentheses
033. Search in Rotated Sorted Array
035. Search Insert Position
041. First Missing Positive
060. Permutation Sequence
076. Minimum Window Substring
080. Remove Duplicates from Sorted Array II
081. Search in Rotated Sorted Array II
082. Remove Duplicates from Sorted List II
083. Remove Duplicates from Sorted List
084. Largest Rectangle in Histogram
092. Reverse Linked List II
093. Restore IP Addresses
094. Binary Tree Inorder Traversal
095. Unique Binary Search Trees II
096. Unique Binary Search Trees
098. Validate Binary Search Tree
102. Binary Tree Level Order Traversal
103. Binary Tree Zigzag Level Order Traversal
104. Maximum Depth of Binary Tree
105. Construct Binary Tree from Preorder and Inorder Traversal
106. Construct Binary Tree from Inorder and Postorder Traversal
107. Binary Tree Level Order Traversal II
108. Convert Sorted Array to Binary Search Tree
109. Convert Sorted List to Binary Search Tree
110. Balanced Binary Tree
111. Minimum Depth of Binary Tree
114. Flatten Binary Tree to Linked List
Folders and files Name Name Last commit message
Last commit date
parent directory
View all files
Implement regular expression matching with support for '.' and '*'.
实现正则匹配中的*和.
用的递归算法,考虑遇到*号时,分为匹配1个字母和
不匹配任何字母两种情况。没有*号则判断是否当前字母
匹配,返回去掉首字母的字符串的匹配情况。
但是递归算法明显慢于动态规划算法,用矩阵去保存子串
的匹配情况更快。
You can’t perform that action at this time.