摘要: 原题链接在这里:https://leetcode.com/problems/reorder-list/ 题目: Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must 阅读全文
posted @ 2015-09-03 05:49 Dylan_Java_NYC 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ 题目: Given an array where elements are sorted in ascending order, con 阅读全文
posted @ 2015-09-03 04:04 Dylan_Java_NYC 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree/ 题目: Given a singly linked list where elements are sorted in ascending 阅读全文
posted @ 2015-09-03 03:36 Dylan_Java_NYC 阅读(370) 评论(0) 推荐(0) 编辑
摘要: Private means this could only be seen within this class. Protected means "package private", this could be seen by subclasses and package members. | Cl 阅读全文
posted @ 2015-09-03 03:07 Dylan_Java_NYC 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/sort-list/ 题目: Sort a linked list in O(n log n) time using constant space complexity. 题解: divide and conquer. 从中 阅读全文
posted @ 2015-09-03 02:59 Dylan_Java_NYC 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 原题链接在这里:https://leetcode.com/problems/insertion-sort-list/ 题目: Sort a linked list using insertion sort. 题解: 与Sort List类似. 当出现cur.val > cur.next.val时就需 阅读全文
posted @ 2015-09-03 01:16 Dylan_Java_NYC 阅读(212) 评论(0) 推荐(0) 编辑