Sort an array containing 0 and 1 in most efficient way.