Question: please provide the code in Java or r Pseudocode Question 1 Given a doubly linked-list (L), and its head and tail: (a) Write an algorithm

please provide the code in Java or r Pseudocode
Question 1 Given a doubly linked-list (L), and its head and tail: (a) Write an algorithm that outputs the reverse of the list L, as a new list, in O(n) time, where n is the length of the linked list. Your so- lution must update both the next and prev pointers appropriately. [5 marks] (b) Explain your algorithm and its running time analysis. [5 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
