Google interview question

Implement a function boolean matches(String text, String pattern) to find match pattern in the string, pattern can be seperated but the order of letters in pattern cannot be changed.

Interview Answers

Anonymous

Apr 11, 2012

longest common subsequence

1

Anonymous

Mar 9, 2012

Can you please clarify what you mean by order of pattern can be separated.

Anonymous

Apr 11, 2012

I think this is a finding a subsequence in a string problem