Pergunta de entrevista da empresa Uber

Given a regular expression pattern and a string, check to see if pattern matches the string.

Respostas da entrevista

Sigiloso

8 de dez. de 2015

#1: generate a non-finite automaton (NFA) from the regular expression. #2: convert NFA to Deterministic finite automaton (DFA) #3: run string through DFA to see if there is a match

Sigiloso

5 de ago. de 2014

Similar to checking if 2 strings are similar (maintain pointers in each string and forward if matches) but look for special chars (like *, & etc)