← Amazon questions

Longest substring in STR1 with characters from STR2

Filed under Amazon

Find the length of the longest substring in STR1 such that all characters in the substring are present in STR2.

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.