Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.
The problem involves constructing a dynamic programming (dp) array to track whether it is possible to break the string s into words in wordDict at each index.
The approach involves iterating backwards and checking if any word in wordDict can be reached from each index onwards.
The time complexity is O(n∗m∗t) and the space complexity is O(n), where n is the length of s, m is the number of words in wordDict, and t is the maximum length word in wordDict.