← Questions

Substring with concatenation of all words

0
AmazonCodingLast asked Jul 2025

Given a string and a list of words of equal length, return every start index where a substring is some concatenation of all the words, each used exactly once. Use a sliding window over word-sized steps.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding