← Goldman Sachs questions

Rearrange Array in Alternating Increasing-Decreasing Order

Filed under Goldman Sachs

Rearrange an array such that every element at an odd index is greater than its neighbors, or follow a specific alternating pattern (e.g., small, large, small, large).

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 Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.