You are given a string, S, and a list of words, L, that are all of the same lengths.
Find all starting indices of
S that is a concatenation of each word in
L exactly once and without any intervening characters.
L: ["foo", "bar"]
Your output should be
[0,9] where order does not matter.
S : "domecodehaha"
L : ["haha","code"]