### Information

 Author(s) Maxime Mawait & Nicolas Rybowski Deadline No deadline Submission limit No limitation Category tags S4, Level 4, Pointer, Linked list, Malloc, Struct

### Tags

Given the provided implementation of a linked list, you need to implement the insert function based on a specific order relation. The goal is to implement an ordered list similar to a LinkedList with a Comparator in Java.

##### Question 1: Order relation

For this subproblem, you need to implement the comparison function which defines the order relationship of the list.

Write the body of the function compare.

/*
* @return: 0 if equals, negative number if @b is greater,
* and positive number otherwise
*/
int compare(char a, char b) {

##### Question 2: Insert

Assuming following linked list structure :

typedef struct node{
char val;
struct node *next;
} node_t;


Write the body of the function insert

/*
* @value: value to be inserted. If the value is already in the list, no element is added and the list is not modified
* @fun: comparison function which defines the order relationship of the list