title: Still not understanding Big-O vs Worst Case Time Complexity
body: <p>The worst case for time taken by linear search is when the item is at the end of the list/array, or doesn't exist. In this case, the algorithm will need to perform <code>n</code> comparisons, to see if each element is the required value, assuming <code>n</code> is the length of the array/list.</p>
  <p>From what I've understood of big-O notation, it makes sense to say that the time complexity of this algorithm is O(n), as it COULD happen that the worst case occurs, and big-O is used when we want to make a conservative estimate of the &quot;worst case&quot;.</p>
  <p>From a lot posts and answers on Stack Overflow, it seems this thinking is flawed, with claims made such as <em>Big-O notation has nothing to do with the worst case analysis.</em></p>
  <p>Please help me to understand the distinction in a way that doesn't just add to my confusion, as the answers here: <a href="https://stackoverflow.com/questions/49849158/why-big-oh-is-not-always-a-worst-case-analysis-of-an-algorithm">Why big-Oh is not always a worst case analysis of an algorithm?</a> do.</p>
  <p>I'm not seeing how big-O has NOTHING to do with worst case analysis. From my current hilltop, it looks like big-O expresses how the worst case grows as the input size grows, which seems very much &quot;to do&quot; with worst-case analysis.</p>
  <p>Statements such as this, from <a href="https://medium.com/omarelgabrys-blog/the-big-scary-o-notation-ce9352d827ce" rel="nofollow noreferrer">https://medium.com/omarelgabrys-blog/the-big-scary-o-notation-ce9352d827ce</a> :</p>
  <p><em>As an example, worst case analysis gives the maximum number of operations assuming that the input is in the worst possible state, while the big o notation express the max number of operations done in the worst case.</em></p>
  <p>don't help much, as I cannot see what distinction is being referred to.</p>
  <p>Any added clarity much appreciated.</p>