mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 12:19:54 +08:00
Add Python and C++ code for the counting sort. (#436)
This commit is contained in:
@@ -72,9 +72,11 @@ int main() {
|
||||
printf("计数排序(无法排序对象)完成后 nums = ");
|
||||
printArray(nums, size);
|
||||
|
||||
countingSort(nums, size);
|
||||
printf("计数排序完成后 nums = ");
|
||||
printArray(nums, size);
|
||||
int nums1[] = {1, 0, 1, 2, 0, 4, 0, 2, 2, 4};
|
||||
int size1 = sizeof(nums1) / sizeof(int);
|
||||
countingSort(nums1, size1);
|
||||
printf("计数排序完成后 nums1 = ");
|
||||
printArray(nums1, size1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user