摘要: FROM思路1. 将后半段截取下来再倒序, 插入到前半段, 时间复杂度为 o(n)代码#include using namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} };class Solution {public: void reorderList(ListNode *head) { if(head == NULL) return; int size = 0; ListNo... 阅读全文
posted @ 2014-02-14 22:57 SangS 阅读(889) 评论(0) 推荐(0)