Break up a string into dictionary words: Given an input string and a dictionary of words, implement a method that breaks up the input string into a space-separated string of dictionary words that a search engine might use for "Did you mean?" For example, an input of "applepie" should yield an output of "apple pie", assuming that "apple" and "pie" are in the dictionary. Deal with the simplest cases only, where the input string can be divided only into two dictionary words. dict = ["apple", "pie"] "applepie" -> "apple pie"
Check out your Company Bowl for anonymous work chats.