Amazon Interview Question

Write a function that receives a huge string and a dictionary, return if it is conformed by existing dictionary words.

Interview Answer

Anonymous

Oct 26, 2016

Tokenize out the "huge string" by spaces, in to individual words. Depending on the problem space, it may be beneficial to then take the individual words and toss them in to a set, to weed out duplicates. Then, check all members of the set.