摘要:
1 class Solution { 2 public void reorderList(ListNode head) { 3 if(head == null) return; 4 if(head.next == null) return; 5 if(head.next.next == null) return; 6 Li... 阅读全文
摘要:
1 class Solution { 2 public ListNode removeNthFromEnd(ListNode head, int n) { 3 if(head == null) return head; 4 if(head.next == null) return null; 5 ListNode node1 = head... 阅读全文
摘要:
1 //10 ms 2 class Solution { 3 public ListNode mergeTwoLists(ListNode l1, ListNode l2) { 4 if(l1 == null) return l2; 5 if(l2 == null) return l1; 6 ListNode head = nu... 阅读全文