Substring with Concatenation of All Words

Given a string and a list of equal-length words, return all starting indices where a concatenation of all words (in any order) appears without gaps.

Each word is used exactly as often as it appears in words, and every match has length words.length * words[0].length. Return the indices in ascending order.

Examples
Input: ["barfoothefoobarman",["foo","bar"]]
Output: [0,9]
Hints

Substring with Concatenation of All Words

Given a string and a list of equal-length words, return all starting indices where a concatenation of all words (in any order) appears without gaps.