← Amazon questions

Sort string based on custom priority string

Filed under Amazon

Given an initial string and a second string containing characters indicating priority, sort the initial string based on the second string's character order. Characters not present in the second string…

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.