phishman3579/java-algorithms-implementation

incorrect comment in algorithms / sorts / QuickSort.java

Blue-Lan opened this issue · 1 comments

There's an incorrect comment on line 14 says "Average case = O(n) Worst case = O(n^2) Best case = O(n_log n)", which contradicts commtent on line 6 and 7 that says " *Quicksort is a sorting algorithm which, on average, makes O(n_log n) comparisons to sort n items. In the worst case, it makes O(n^2) comparisons", I think the latter is correct.

Thanks @Blue-Lan for the issue, the comment has been updated. It looks like I reversed the best and average cases.