Former Google Interview Question - Longest word in dictionary that is a subsequence of a string

Found on https://www.careercup.com/question?id=5757216146587648


While there are many ways to solve this problem, I think the simplest way is to process all the words in the dictionary keep track of the number of characters that have been found.

Sample code snippet in Python.

Comments

Popular Posts