Write a method in class SLL called public static SLL reverse() that produces a new linked list
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a method in class SLL<T> called public static SLL<T>reverse() that produces a new linked list with the contents of the original list reversed. Make sure not to use any methods like addToHead() or addToTail(). In addition, consider any special cases that might arise. (b) What is the big-O complexity of your method in terms of the list size n.
Related Book For
Posted Date: