title: sequential sorting algorithm
body: <p>I wanted to sort elements that come in sequentially, i.e., I want my vector to be sorted before the next element comes in. I know that insertion sort has complexity n^2, if I have a total of n elements. Merge sort should be better. However, it is often said that merge sort has complexity n log n; but I guess that is true if you are going to sort n elements at once. If they come, instead, one by one and you need the temporary vector to be sorted, the complexity goes up to \sum_{i=2}^n i log(i). This is still less than n^2 I presume, but definitely more than n log n. </p>
  
  <p>Is that correct?</p>
  
  <p>Thanks</p>