Here is the interview question prompt, presented for reference.
We're given a string and need to see if it can be broken down into words from a dictionary array. For example:
const str = "applecomputer";
const dictArr = ["apple", "computer"];
stringBreakdown(str, dictArr);
// true
Assuming that there are no repeats in the dictionary array, can you write a method that will return true
if the string can be broken down into words from the array, or false
if not?
1000
ASCII
characters (all or some of it)O(n^2)
O(n)
You can see the full challenge with visuals at this link.
Challenges • Asked almost 7 years ago by Jake from AlgoDaily
This is the main discussion thread generated for String Breakdown.