CODE in C: Can someone help me iwth implementation of RADIX sort usilg LINK LINS
ID: 663783 • Letter: C
Question
CODE in C: Can someone help me iwth implementation of RADIX sort usilg LINK LINST ONLY, please don't answrr if it is not link list and suppose i have 3 numbers to sort i will do RADIX 3 and if 10 then RADIX 10 and so on. PLEASE HELP!!
Explanation / Answer
#include #include #include #include "../utility.h" typedef struct linklist { int value; struct linklist *next; }LinkedList; void radixSort(int a[],int length,int bit) { LinkedList *b[10]; int i,remainder,j; LinkedList *tmp,*last; for(i = 0; i next = NULL; } else { printf("1111"); last = tmp; tmp = b[remainder]->next; while(tmp != NULL) { last = tmp; tmp = tmp->next; } printf("2"); tmp = (LinkedList *)malloc(sizeof(LinkedList)); tmp->value = a[i]; tmp->next = NULL; last->next = tmp; } printf("tmp->value=%d ",a[i]); } for(i = 0,j = 0; i value; } } printArray(a,0,7); } void getMaxtmpt(int a[],int length,int* d) { int i,tmp=1; for(i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.