- Write an iterative algorithm in Java-like pseudocode for
printing a singly linked list in reverse in O(N) time. You can use
as much extra space as you need. The original list pointers CAN NOT
BE MODIFIED. State in big-O notation how much extra space is used
by this algorithm.
- Write another iterative algorithm in Java-like pseudocode for
printing a singly linked list in reverse using O(1) extra space.
The original list pointers CAN NOT BE MODIFIED. This algorithm can
have any runtime (it will be worse than the algorithm in part a).
State the runtime of your algorithm in big-O notation.
PLEASE WRITE IN PSEUDOCODE
thank you very much :)