Problem Description

Array me sirf 0,1,2 hain. Sort it in O(n) time and O(1) extra space.

Input Format

One line: n then n integers.

Output Format

One line: sorted array.

Sample Test Case

Input:
8 0 2 1 2 0 1 1 0
Output:
0 0 0 1 1 1 2 2

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next