10. Regular Expression Matching

recursion

T: O(|s| * |p|), |s| is s state, |p| is p state,

S: O(|s| * |p|),

time: O(mn)

space: O(mn)

Last updated

Was this helpful?