Approach I:Getting Time Limit exceeded

Increase the length of the substring starting from the start
character.

If its in dict then call same function on the reaming
string.
	If it returns true then return true else increase the
	length of the substring
Approach II:Getting Time Limit exceeded

Decrease the length of the substring starting from the complete word.

If its in dict then call same function on the remaining
string.
	If it returns true then return true else decrease the
	length of the substring
Approach III: Accepted

Used the memoization. with Approach II:
Decrease the length of the substring starting from the complete word.

If its in dict then call same function on the remaining
string after adding it to the stored array.
	If it returns true then return true(after modifying the
	array) else decrease the length of the substring