Question: PLEASE Type the code. Please provide correct answer!! Question 2 (25 Marks) In this question, we will learn about a variant of linked list called
PLEASE Type the code.
Please provide correct answer!!


Question 2 (25 Marks) In this question, we will learn about a variant of linked list called "doubly Linked List". In addition to the "ext pointer pointing to the next node in the list a node in a doubly linked list also contains a pointer "prev" pointing to the previous node in the list 10 4 5 One implementation of the doubly linked List is as follows. #include / Node definition for doubly linked list typedef struct dllnodet int data struct dllnodenext struct doe prev DLLnode.t; Definition of doubly linked list typedef struct DLLnode.t *head DLL.t Creates a doubly linked list DLLt DLLCreate ) DLL-t * ret = malloc ( sizeof ( DLL-t ) ) ; ret->head = NULL return ret; // Appends a DLLnode_t containing the valueinto a DLL.t void DLLAppend (DLLt intlist, int x) // Create DLLnode-t DLLnode.t * newNode = malloc ( size of ( DLLnode-t ) ) ; newNode->data = x newNode->prev = NULL ; newNode-> next = NULL; Point head to new node if list is empty if(int list->head-=NTIL) { in t l i s t->head return new-Node ; = DLLnode.t * temp=intlist->head; while(temp->next != NULL) { temp= ternp->next; // Go To last Node temp-> next = newNode; newNode->prev temp; /Prints the elements of a doubly linked list void DLLPrint (DLLt intlist) DLLnode.t * temp= int list->head; while (temp !=NULL) { printf( "%du" , temp->data ) ; temp = temp->next; printf("n") Part a) Based on the doubly linked list implementation given above, implement a func- tion called "DLLReverse" to reverse a list. For example, if a doubly linked list originally contains the list 14, 5, 7, 7, 9), after calling DLLReverse, the list would become f9, 7, 7, 5, 4). The function prototype is given below // Reverses DLL.t void DLLReverse (DLL.t intlist) Part b) Implement a function called "DLLRemove" to remove any node at a specified index "ind". Just as with C+ arrays, the first element of the list should have an index of 0. Starting at 0, indices go up to one less than the length of the list Your DLLRemove function should give the following message if the user passes in an invalid index: Warning: Invalid index." No other operations should be done if the index is invalid. The function prototype is given below. //Removes the element at indez ind for a DLL.t, anod void DLLRemove(DLLtintlist, int ind)