Question: In class, we have studied the singly linked list, implemented as follows: (Code can be found in the accompanying .c le) #include #include typedef struct

In class, we have studied the singly linked list, implemented as follows: (Code can be found in the accompanying .c le)

#include #include

typedef struct _node { int data; struct _node * next; } node_t;

typedef struct { node_t * head; node_t * tail; } LL_t;

LL_t * LLcreate() { LL_t * ret = malloc(sizeof(LL_t)); ret->head = NULL; ret->tail = NULL; return ret; }

void LLappend(LL_t * intlist, int value) { node_t * newNode = malloc(sizeof(node_t));

newNode->data = value; newNode->next = NULL;

if (intlist->head == NULL) { intlist->head = newNode; intlist->tail = newNode; } else { intlist->tail->next = newNode; intlist->tail = newNode; } }

Part a) Implement a function LLMax to return the biggest number in the linked list. For example, if a linked list has the elements {5, 100, -100, 2019}, the function LLMax should return 2019. If the linked list is empty, the function should return any integer of your choice, and display the message Empty List! The function prototype is given below. // Returns the biggest number in the LL t int LLMax(LL t i n t l i s t ) { } Part b) Implement a function LLDelete which removes all occurrences of a target number if it is found in the linked list, and displays Value not found if the target number is not found. The function prototype is given below. // Deletes the node containing the target integer , and // warns user i f the target is not found void LLDelete (LL t intlist , int target ) { }

*****Please also provide me a main function in .c format to test the functions. Thanks!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!