You are viewing a single comment's thread. Return to all comments →
C99 Solution:
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main() { int n; scanf("%d", &n); int i,j,array[100] = {0}; for(i=0;i<n;i++) { int num; scanf("%d", &num); array[num]++; } for(i=0; i< 100; i++) { for(j=0; j<array[i]; j++) { printf("%d ", i); } } }
Counting Sort 2
You are viewing a single comment's thread. Return to all comments →
C99 Solution: