← Amazon questions

Debug switch statement code and arrange even numbers at even indices

Filed under Amazon

Given an array of integers, write a function to determine if all even numbers in the array can be rearranged or accommodated such that they reside at even indices (0, 2, 4, etc.). Print 'Yes' or 'No'.

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.