Adobe Interview Question

sort array 1,1,0,0,2,2 such that it becomes 0,0,1,1,2,2