Nagarro interview question

An array has 0s and 1s. Sort the array in O(n).