Question: Write a program that uses the operations described below on a singly linked list composed of structs that contain three fields, an integer field, a

Write a program that uses the operations described below on a singly linked list composed of structs that contain three fields, an integer field, a character field, and a link field. Input and output file usage is required. The data should come from the ASCII printable characters and their ordinal values.

1.Fill the linked list with 23 nodes using the method given in class.

2. Remove the first node from the linked list and print the contents. The node should then become the first node in a new linked list. The original linked list is otherwise left unchanged.

3. Implement the recursive reverse print function for a linked list.

4. Implement the standard print function for a linked list that will leave the linked list unchanged.

5. Write a function that will find the length of a linked list.

6. Write a function that will destroy a linked list. (Do not destroy the original linked list. Create a new one using the original method.)

7. Write a function that will insert an element at the head of a linked list. Write a function that will insert an element at the tail of a linked list.

8. Write a function that will form the union of two linked lists. You need two different linked lists to show that this function works.

9. Write a function that will take two lists and form the intersection of the two lists. Write a function that will find the maximum and the minimum values in a linked list. The maximum value is returned.

10. Write a function to insert a new value into a linked list before a value called

currentval. The new value is called newval.

11. Write a function that will delete a value that is in front of a value called currentval. The contents of the deleted node are printed.

12. Write a function that will delete from the head of a linked list. Write a function that will delete from the tail of a linked list.

13. Write a function that will create a copy of a linked list. The original linked list remains unchanged.

14. Write a function that will replace every occurrence of a given name (you may choose the name that you want to delete), deletename, in a linked list with a new value, newname. The linked list remains otherwise unchanged.

15. Write a function that will reverse a linked list in place. Do not use an additional

list.

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!