From 547f39abbda4c2ad60442eb5cbf4c5e4ed9727d8 Mon Sep 17 00:00:00 2001 From: Anika Kamath <87904385+anika-kamath@users.noreply.github.com> Date: Fri, 7 Oct 2022 15:34:06 +0530 Subject: [PATCH] chore(C): added file for counting sort --- counting_sort.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 counting_sort.c diff --git a/counting_sort.c b/counting_sort.c new file mode 100644 index 00000000..699f22ad --- /dev/null +++ b/counting_sort.c @@ -0,0 +1,33 @@ +#include + +void counting_sort(int a[],int n,int max) +{ + int count[50]={0},i,j; + + for(i=0;imax) + max=a[i]; + } + + counting_sort(a,n,max); + return 0; +} \ No newline at end of file