← Amazon questions

Move zeros to the end of an array

Filed under Amazon

Modify an array containing zero and non-zero elements so all zeros are at the end. Return the number of swaps performed and the count of non-zero elements.

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.