摘要: 3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:El... 阅读全文
posted @ 2015-05-30 20:12 `Liok 阅读(1046) 评论(0) 推荐(0) 编辑
摘要: Reverse Linked ListReverse a singly linked list.click to show more hints.Hint:A linked list can be reversed either iteratively or recursively. Could y... 阅读全文
posted @ 2015-05-30 15:43 `Liok 阅读(719) 评论(0) 推荐(0) 编辑
摘要: Contains Duplicate IIGiven an array of integers and an integer k, return true if and only if there are two distinct indices i and j in the array such ... 阅读全文
posted @ 2015-05-30 15:28 `Liok 阅读(431) 评论(2) 推荐(0) 编辑
摘要: Reverse Nodes in k-GroupGiven 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... 阅读全文
posted @ 2015-05-30 00:41 `Liok 阅读(456) 评论(0) 推荐(0) 编辑
摘要: Tenth LineHow would you print just the 10th line of a file?For example, assume thatfile.txthas the following content:Line 1Line 2Line 3Line 4Line 5Lin... 阅读全文
posted @ 2015-05-30 00:17 `Liok 阅读(384) 评论(0) 推荐(0) 编辑