摘要: 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... 阅读全文
posted @ 2018-08-18 07:16 jasoncool1 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2018-08-18 00:46 jasoncool1 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2018-08-18 00:26 jasoncool1 阅读(86) 评论(0) 推荐(0) 编辑