Reverse a singly linked-list with and without using an auxiliary data structure.
Sigiloso
public void Reverse() { Link cur = head; Link prev = null; Link temp = null; while (cur != null) { temp = cur.next; cur.next = prev; prev = cur; cur = temp; } tail = head; head = prev; }