2015年1月9日

摘要: 题目:Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your al... 阅读全文
posted @ 2015-01-09 23:49 承续缘 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a singly linked listL: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 e... 阅读全文
posted @ 2015-01-09 23:19 承续缘 阅读(275) 评论(1) 推荐(0) 编辑
摘要: 原题:Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen lef... 阅读全文
posted @ 2015-01-09 11:22 承续缘 阅读(221) 评论(0) 推荐(0) 编辑

导航