Given a string of text without spaces and a list of words, can you determine if the string of text can be fully divided into the words from the list? Print
true if it can and
Here's the list of words to use for the challenge:
["a", "able", "are", "area", "be", "car", "care", "ear", "hello", "not", "note", "or", "to", "the", "world"]
You are provided with boilerplate code to process the input, but here's the format in case you want to do it yourself:
The first line contains
t for the number of test cases.
t lines follow which each contain one line of text without any spaces.
Output true or false for each line of input.
3 helloworld hellozworld arearea
true false true
The first line can be split into
hello world while the third line can be split into