Word Break Problem 【O(n * s) time complexity】

In this problem we are given with a string and a dictionary of words, we need to find if the string can be segmented to words so that all the segmented words are present in the dictionary.

This is a companion discussion topic for the original entry at http://iq.opengenus.org/word-break-problem/