โ† Snapdeal questions

Sort an array containing only digits 1, 2, and 3 in O(n)

Filed under Snapdeal

The question

Sort an array consisting only of digits 1, 2, and 3 in linear time O(n) without using standard sorting algorithms.

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

Related Snapdeal questions

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