title: sort while inserting or copy and sort
body: <p>I have an iterator that gives me n elements. Currently I copy them one by one into an ArrayList and then call Collections.Sort() on that list to obtain a sorted ArrayList. This takes nlog(n)+n operations. Is there a faster way to do it, i.e. can I already use the insertion operation to a certain degree?</p>
  
  <p>The iterator does not give any sorting, the elements occur pretty much randomly.</p>