โ† Amazon questions

Move all 0's to left and 1's to right in a stream

Filed under Amazon

Given a stream of 0s and 1s of unknown size, rearrange them so all 0s are placed on the left and all 1s are placed on the right.

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.