(i) Given a string as input find whether the string is accepted by a given regex or not.
(ii) A problem similar to Meeting Rooms II
There is a input String and input of a list.
The return will be the longest subString in the list.
Example;
input
String: toes
List: { t, o, to, es, toes}
return {toes}
intput
String: toestate
List:{ et, eto, eteot, es, state}
reurn {eteot, state}