Nagarro interview question

sort an array containing 0 and 1 in O(n)