Got ask this question today, anyone knows how to solve it? I tried to come up with a recursive function in search() method which search for all possible combination. Then search each one in the hash map. I failed as I am not able to write the correct recursive function...
add(word)
add a "word" into the data structure, this function doesn't need to return anything
e.g.
search(word):