Given a string A and list of words B(words in B are of same length).
Find and return the starting indices of the substrings in string A, which contains all the words present in list B.
The arguments given are string A and a list of string B.
Return the starting indices of the substrings in string A, which contains all the words present in list B.
1 <= length of the string A <= 4000 1 <= total length of list B if all the words are concatenated <= 4000
Input 1: A = "barfoothefoobarman" B = ["foo", "bar"] Output 1: [0, 9] Input 2: S = "catbatatecatatebat" L = ["cat", "ate", "bat"] Output 2: [0, 3, 9]
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.