title: worst case time complexity
body: <p>An unsorted list of n numbers, find any two numbers among the list having minimum difference. If i'll have to write an algorithm for this, with worst case-time <code>O(nlogn)</code>. Can the following algorithm work:</p>
  
  <ol>
  <li>sort list using merge sort</li>
  <li>traverse the whole list once, to find difference between consecutive numbers.</li>
  <li>return numbers having minimum difference.</li>
  </ol>
  
  <p>Is the time complexity for such algorithm will be: <code>O(nlogn + n)</code> which I can say <code>O(nlogn)</code>?</p>