馬老師MySQL實戰(zhàn)調(diào)優(yōu)
? ? ? ?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;
標(biāo)簽: