leetle

45. Regular Expression Matching

Write a function solve that implements regular expression matching with support for '.' and '*'. '.' matches any single character, '*' matches zero or more of the preceding element.

Example: Input: "aa", "a*" Output: True

Make sure you return your solution, don't print!


def solve(s, p):
    pass