Question: Write a recursive method to print the items in a linked list in reverse order. Do not modify any of the links. Easy: Use quadratic
Write a recursive method to print the items in a linked list in reverse order. Do not modify any of the links. Easy: Use quadratic time, constant extra space. Also easy: Use linear time, linear extra space. Not so easy: Develop a divide-and-conquer algorithm that takes linearithmic time and uses logarithmic extra space.
Step by Step Solution
3.45 Rating (165 Votes )
There are 3 Steps involved in it
Sure Here are three methods to print the items in a linked list in reverse order 1 Quadratic time constant extra space We can achieve this by starting ... View full answer
Get step-by-step solutions from verified subject matter experts
