2016年9月13日

147. Insertion Sort List

摘要: Sort a linked list using insertion sort. 用一个辅助指针来做表头避免处理改变head的时候的边界情况。 阅读全文

posted @ 2016-09-13 14:49 三颗心 阅读(176) 评论(0) 推荐(0) 编辑

143. 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 do this in-place without altering the nodes' values. For 阅读全文

posted @ 2016-09-13 10:42 三颗心 阅读(375) 评论(0) 推荐(0) 编辑

导航