上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 24 下一页
摘要: Find all possible combinations ofknumbers that add up to a numbern, given that only numbers from 1 to 9 can be used and each combination should be a u... 阅读全文
posted @ 2015-05-29 16:51 丶Blank 阅读(494) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
posted @ 2015-05-29 16:18 丶Blank 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num... 阅读全文
posted @ 2015-05-29 14:32 丶Blank 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],... 阅读全文
posted @ 2015-05-29 10:30 丶Blank 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations.For example,[1,1,2]have the following unique perm... 阅读全文
posted @ 2015-05-28 10:11 丶Blank 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 因为redis是用c写的,c中没有自带的map,所以redis自己实现了map,来看一下redis是怎么实现的。1、redis字典基本数据类型redis是用哈希表作为字典的底层实现,dictht是哈希表的定义:typedef struct dictht { // 哈希表节点指针数组(俗称桶,b... 阅读全文
posted @ 2015-05-25 22:30 丶Blank 阅读(889) 评论(0) 推荐(0) 编辑
摘要: Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
posted @ 2015-05-25 17:07 丶Blank 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return 0 i... 阅读全文
posted @ 2015-05-25 16:38 丶Blank 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not... 阅读全文
posted @ 2015-05-24 20:28 丶Blank 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list using insertion sort.题目大意:将一个单链表使用插入排序的方式排序。解题思路:先新建一个头指针,然后重新构建一下这个单链表,每次从头找到第一个比当前元素大的,插在这个元素前面。/** * Definition for singly-linke... 阅读全文
posted @ 2015-05-24 19:23 丶Blank 阅读(98) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 24 下一页