Codility icon indicating copy to clipboard operation
Codility copied to clipboard

00-prewritten_algorithms/counting_sort.cpp

Open RaviBeagle opened this issue 3 years ago • 2 comments

I think the algorithm does not work for simple positive range. It fails with this test case:

vector<int> A { 102, 120, 101, 103 , 101, 121, 160, 140 }; counting_sort(A, 100,200);

RaviBeagle avatar Feb 05 '22 13:02 RaviBeagle

you must pass the correct min/max values here. counting_sort(A, 101,160)

Behrouz-m avatar Apr 07 '22 17:04 Behrouz-m