← Amazon questions

Sort array where elements swap only with index x+k

Filed under Amazon

Given an array where an element at index i can only be swapped with index i+k, determine if the array can be sorted.

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.