Write routine getAllWords that takes as parameter a word and returns a Set containing all the substrings of the word. The substrings do not need to be real words, nor contiguous, but the letters in the substrings must retain the same order as in the word. For instance, if the word is cabb, words that set returned by getAllWords would be [ "", "b", "bb", "a", "ab", "abb", "c", "cb", "cbb", "ca", "cab", "cabb" ].
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here