Skip to content

Files

Latest commit

Jan 6, 2020
bce201c · Jan 6, 2020

History

History
17 lines (11 loc) · 844 Bytes

README.md

File metadata and controls

17 lines (11 loc) · 844 Bytes

Daily Coding Problem: Problem #25 [Hard]

Good morning! Here's your coding interview problem for today.

This problem was asked by Facebook.

Implement regular expression matching with the following special characters:


  • . (period) which matches any single character
  • * (asterisk) which matches zero or more of the preceding element That is, implement a function that takes in a string and a valid regular expression and returns whether or not the string matches the regular expression.

For example, given the regular expression "ra." and the string "ray", your function should return true. The same regular expression on the string "raymond" should return false.

Given the regular expression ".*at" and the string "chat", your function should return true. The same regular expression on the string "chats" should return false.