title: How to sort binary array in linear time?
body: <p><a href="http://www.techiedelight.com/sort-binary-array-linear-time/" rel="nofollow noreferrer">http://www.techiedelight.com/sort-binary-array-linear-time/</a></p>
  
  <p>Linear time means that we have to traverse the array only one time but according to the solution here, we will first traverse the array to find the number of zeros, and then we traverse it again to fill the first part of the array with zeros and the remaining part with ones.</p>
  
  <p>So, how is that linear time solution?
  What point am I missing?</p>