We are given with a valid sentence without any spaces and we are given with a dictionary of words. We need to print all the possible ways to break the sentence so that all the breaked words belongs to the dictionary.
This is a companion discussion topic for the original entry at http://iq.opengenus.org/all-valid-word-breaks/