title: Are O(n log n) algorithms always better than all O(n^2) algorithms?
body: <p>When trying to properly understand Big-O, I am wondering whether it's true that <code>O(n log n)</code> algorithms are <strong>always</strong> better than <strong>all</strong> <code>O(n^2)</code> algorithms. </p>
  
  <p>Are there any particular situations where <code>O(n^2)</code> would be better? </p>
  
  <p>I've read multiple times that in sorting for example, a <code>O(n^2)</code> algorithm like bubble sort can be particularly quick when the data is almost sorted, so would it be quicker than a <code>O(n log n)</code> algorithm, such as merge sort, in this case?</p>