If the substring is present into the dictionary then recurse for other substring of the string
if ( dict . find ( word ) != dict . end ( ) ) { string rem = s . substr ( 0 , i ) ; vector < string > prev = combine ( wordBreakUtil ( rem ) , word ) ; res . insert ( res . end ( ) , prev . begin ( ) , prev . end ( ) ) ; } }