โ† Amazon questions

Rearrange positive and negative numbers alternately in O(1) space

Filed under Amazon

Rearrange an array of positive and negative numbers alternately, maintaining relative order, with extra elements at the end, using O(1) space.

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.