โ† Amazon questions

Rearrange array alternating positive and negative numbers retaining relative order

Filed under Amazon

Given an array of positive and negative integers, rearrange them such that positive and negative numbers alternate, while preserving the relative initial order of the positive and negative 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.