Quicksort & dictionary SOLUTION

Implement using list data structure. Function insert takes a record and inserts it into the dictionary. Function find takes a word and returns some record from the dictionary whose word matches the one provided. If there are multiple records in the
dictionary with that word value, there is no requirement as to which one is returned. The remove function is similar to find, except that it also deletes the record returned from the dictionary. Function size returns the number of elements in the dictionary
Implement the (language)-English dictionary using list data structure. Function insert takes a
record and inserts it into the dictionary. Function find takes a word and returns some record
from the dictionary whose word matches the one provided. If there are multiple records in the
dictionary with that word value, there is no requirement as to which one is returned. The
remove function is similar to find, except that it also deletes the record returned from the
dictionary. Function size returns the number of elements in the dictionary.



Modify Quicksort to sort a sequence of variable-length strings stored one after the other in a
character array, with a second array (storing pointers to strings) used to index the strings.
Your function should modify the index array so that the first pointer points to the beginning
of the lowest valued string, and so on.
Also this is sort of a template I received for a first task:struct node* add (struct node *head, int data) {
struct node *tmp;
if (head == NULL){
head = (struct node *)malloc(sizeof (struct node));
if (head == NULL){
printf("Error! memory is not available\n");
exit(0);
}
head- data = data;
head- next = NULL;
}else {
tmp = head;
while (tmp- next != NULL)
tmp = tmp- next;
tmp- next = (struct node *)malloc(sizeof(struct node));
if(tmp - next == NULL)
{ printf("Error! memory is not available\n");
exit(0);
}
tmp = tmp- next;
tmp- data = data;
tmp- next = NULL;
} return head; }
Powered by