title: Why is counting sort not used for large inputs?
body: <p>Counting sort is the sorting algorithm with a average time complexity of O(n+K), and the counting sort assumes that each of the input element is an integer in the range of 0 to K.</p>
  
  <p>Why can't we linear-search the maximum value in an unsorted array, equal it to K, and hence apply counting sort on it?</p>