reversing a linked list by swapping the data: ListNode left = head; ListNode right = tail; for(int i=0; i