1. Implement the Lithuanian-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.

Non-completed input file attached. It will be expanded later

I am given a few templates so program should be somewhat similar.

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; }

void printlist (struct node *head)

{

struct node *current;

current = head;

if (current != NULL)

{

do

{ printf ("%d\t",current->data);

current = current->next;

}

while (current != NULL);

printf ("\n");

}

else

printf ("The list is empty \n");

}

void destroy (struct node *head)

{

struct node *current, *tmp;

current = head->next;

head->next = NULL;

while(current != NULL) {

tmp = current->next;

free(current);

current = tmp;

}

}

void remove (struct node *e)

{ struct node *d = e->next;

if ( d != NULL )

e->next = d->next;

free(d);

}

  1. 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.

Programs must include explanations and be written as simple as possible. I am a beginner.

For more questions I can also be reached at

Please note the deadline in 3.5 hours, might be extended to 4 hours

Please send me 2 complete, working programs that satisfy requirements in c++, or maybe a little bit of c.