Question: 5. 18 Points] Linked List Given a linked list, write a method (pseudocode) to reverse the contiguous even elements and print the updated linked list.
![5. 18 Points] Linked List Given a linked list, write a](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f2e2edcf0c0_83766f2e2ed3b3d1.jpg)
5. 18 Points] Linked List Given a linked list, write a method (pseudocode) to reverse the contiguous even elements and print the updated linked list. Consider the following examples: Input: 1 -> 2 -> 3 -> 3 -> 4 -> 6 -> 8 -> 5 -> NULL Output: 1 2 3 3 8 6 4 5 Initial list: 1 -> 2 -> 3 -> 3 -> 4 -> 6 -> 8 -> 5 -> NULL Reversed list: 1 -> 2 -> 3 -> 3 -> 8 -> 6 -> 4 -> 5 -> NULL Input: 11 -> 32 -> 7 -> NULL Output: 11 327 What is the space and time complexity of your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
