As I read a book about "Algorithm Analysis", I came across
However, I have read elsewhere that "Quick Sort/ Merge Sort" are the best and the most efficient sorting algorithms. I found this confusing because the complexity of
O(n+k), which is better than Mergesort and Quicksort which are O(n ln n).
What is the problem with this sorting Algorithm?
What are the best sorting Algorithms?
def count_sort(seq): b, c = , defaultdict(list) for x in seq: c[x].append(x) for k in range(min(c), max(c)+1): b.extend(c[k]) return b