← Amazon questions

Relative sorting

Filed under Amazon

Sort an array of elements based on the relative order defined by a second array. Elements not in the second array should be appended at the end in sorted order.

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.