Question: Problem is in C Problem 3: Linked! In this problem, first you construct a linked list using both prepend and append operations. Then you have

Problem is in C

Problem is in C Problem 3: Linked! In this problem, first you

Problem 3: Linked! In this problem, first you construct a linked list using both prepend and append operations. Then you have to reverse the linked list and print it out. The input format in each line is where is the either 1 or -1. If 1 append the to the list. If -1 then prepend the to the list. If is 0 then reverse the linked list and print it out (i.e. print the values of the nodes of the reversed linked list in one line, separated by space, no newline in the end) and exit the program. Sample output: 50 10-35 100 20 40 Sample input: 1100 1 20 1-35 110 1 40 1-50 0) NOTE: You MUST use structs and pointers to represent a linked list. If you use arrays to hold the data, you will not receive any points for this

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!