马老师MySQL实战调优
head = tailNext;
tail = re;
}
tail = tail.next;
}
return result.next;
}
public ListNode[] reversalList(ListNode head,ListNode tail) {
ListNode[] result = {head,tail};
if(head == null || head == tail) {
return result;
}
ListNode temp = head;
while(temp!=tail) {
ListNode t = tail.next;
tail.next = temp;