Question: Write a C + + program that works with Linked Lists and performs the following operations: reverse Description: * reverses the contents of the linked
Write a C program that works with Linked Lists and performs the following operations:
reverse
Description: reverses the contents of the linked list
returns a pointer to the head of the new linked list
Work with singly linked lists, DO NOT use doubly linked lists.
The list must mutate, that is the list received as a parameter must disappear, only the new list persists
Input: Pointer to pointer to the beginning of the list to be reversed
Output: Pointer to the beginning of the new linked list reordered
Precondition: A valid linked list
Postcondition: A valid linked list
equals
Description: Checks if two linked lists have the same content.
Input: two pointers to valid linked lists
Output: true false
Precondition: two valid linked lists
Postcondition: two valid linked lists
concat
Description: Concatenates list list
Input: two pointers to valid linked lists
Output: nothing
Precondition: both linked lists are valid
Postcondition: The first linked list contains the elements it originally contained plus the elements of the other linked list
All functionalities must be correctly aligned and documented. The complexity of each of them must be included as part of the documentation.
input:
m
m integer data
n
n integer data
output :
reversed list
reversed list
reversed list reversed list
true false
Input example:
Output example
false
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
