← OYO questions

Sort Array of 0s, 1s, and 2s in Single Traversal

Filed under OYO · Also reported at Oracle

Given an array consisting only of 0s, 1s, and 2s, sort the array in a single pass without using built-in sorting algorithms (Dutch National Flag problem).

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 OYO questions

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