2014年9月5日

leetcode - Reverse Nodes in k-Group

摘要: 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 left-o... 阅读全文

posted @ 2014-09-05 12:29 laihaiteng 阅读(190) 评论(0) 推荐(0)

leetcode - Swap Nodes in Pairs

摘要: 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 algor... 阅读全文

posted @ 2014-09-05 11:05 laihaiteng 阅读(174) 评论(0) 推荐(0)

leetcode - Add Two Numbers

摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文

posted @ 2014-09-05 10:24 laihaiteng 阅读(127) 评论(0) 推荐(0)

导航