โ† BNY Mellon questions

Convert an array into a Zig-Zag fashion

Filed under BNY Mellon

Rearrange an array of integers in-place such that the elements follow a zig-zag pattern (i.e., a[0] < a[1] > a[2] < a[3] > a[4] ...).

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 BNY Mellon questions

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