title: Java - Is calling sort() upon an already sorted list an O(1) operation?
body: <p>Does the <code>Collections.sort(list)</code> check if the <code>list</code> is already sorted or is it maybe O(1) for some other reason?<br>
  Or, is it a good idea to have a flag <em>sorted</em> and set it to <code>true</code>/<code>false</code> upon calling <code>sort()</code>/adding an element to the list?</p>