โ† PayU questions

Segregate 0s and 1s in an array in a single traversal

Filed under PayU

The question

Given an array containing only 0s and 1s, sort or segregate all 0s to the left and 1s to the right in one pass.

No write-up yet. Related questions below have one.

Related PayU questions

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