← Amazon questions

Minimum length substring containing all pattern characters

Filed under Amazon

Given a string `text` and a string `pattern`, find the minimum length substring of `text` that contains all characters of `pattern` (including duplicates). If no such substring exists, return an empty…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.