Suppose you have a dictionary that contains valid words.
Given an input string with all spaces removed, determine whether the string is composed of valid words or not.
You can assume the dictionary is a hashtable that provides O(1) lookup.
Please give a recurrence relation for this. I found this question in a book , but the book gives no answer?
1 Answer