Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(WRITE PROGRAM IN C LANGUAGE) Question 1 (25 Marks) In class, we have studied the singly linked list, implemented as follows: #include #include typedef struct

(WRITE PROGRAM IN C LANGUAGE)

image text in transcribed

Question 1 (25 Marks) In class, we have studied the singly linked list, implemented as follows: #include #include typedef struct node t int data struct node next; node.t typedef struct f node.t head; nodet tail LL.t LLt LLcreate0 LL-t * ret = malloc ( sizeof ( LL-t ) ) ; ret->head NILL. ret-> t a i l = NULL ; return ret void LLappend (LL.t intlist, int value) nodet newNodemalloc (sizeof (node-t)): newNode->datavalue newNode--> next = NULL if intlist ->headNULL) intlist-headnewNode; intlist-> t all = new-Node ; else intlist tail-next - newNode intlist-> t all = 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. The function prototype is given below //Returns the biggest number in the LLt int LLMax( LL.t intlist) 1 Part b) Implement a function "LLDelete" which removes 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 if the target is not found void LLDelete (LLt intlist, int target)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions