If the substring is present into the dictionary then recurse for other substring of the string
if ( word in dict_t ) : NEW_LINE INDENT rem = s [ : i ] NEW_LINE prev = combine ( wordBreakUtil ( rem ) , word ) ; NEW_LINE for i in prev : NEW_LINE INDENT res . append ( i ) NEW_LINE DEDENT DEDENT