摘要: QuestionGiven an arraySofnintegers, are there elementsa,b,c, anddinSsuch thata+b+c+d= target? Find all unique quadruplets in the array which gives the... 阅读全文
posted @ 2015-11-05 22:56 树獭君 阅读(202) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven 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 ofkthe... 阅读全文
posted @ 2015-11-05 21:59 树獭君 阅读(112) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven 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.Yo... 阅读全文
posted @ 2015-11-05 11:31 树獭君 阅读(166) 评论(0) 推荐(0) 编辑
摘要: QuestionGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3w... 阅读全文
posted @ 2015-11-05 09:09 树獭君 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Sum类的题目一般这样:input: nums[], targetoutput: satisfied arrays/ lists/ number拿到题目,首先分析:1. 是几个数的sum2. sum是要求等于target还是小于还是大于还是closest3. 返回的是原数组下标还是其他对于这类题目,... 阅读全文
posted @ 2015-11-05 02:26 树獭君 阅读(422) 评论(0) 推荐(0) 编辑