Algorithm · Amazon · Medium
Requirements Process characters as they arrive and identify each completed window that is an anagram of a predetermined target word. The window always has the same length as the target. Whenever the most recent len(target) characters form a permutation of the target, report that window's starting position. Use zero-based positions for reported indices. A streaming interface may be represented as follows: Each call to push consumes one character. It reports the matching…
Checking your access…