上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 24 下一页
摘要: Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.题目大意:... 阅读全文
posted @ 2015-05-20 13:49 丶Blank 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.题目大意:不用乘除取模运算计算两个数的除。解题思路:只能用位运算了,当被除数大于... 阅读全文
posted @ 2015-05-19 19:33 丶Blank 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not... 阅读全文
posted @ 2015-05-19 11:52 丶Blank 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文
posted @ 2015-05-19 11:33 丶Blank 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 首先,sds即simple dynamic string,redis实现这个的时候使用了一个技巧,并且C99将其收录为标准,即柔性数组成员(flexible array member),参考资料见这里。柔性数组成员不占用结构体的空间,只作为一个符号地址存在,而且必须是结构体的最后一个成员。柔性数组成... 阅读全文
posted @ 2015-05-17 17:45 丶Blank 阅读(900) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express... 阅读全文
posted @ 2015-05-05 22:58 丶Blank 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog... 阅读全文
posted @ 2015-05-05 22:52 丶Blank 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates,nums, return all possible subsets.Note:Elements in a subset must be in non-descending ord... 阅读全文
posted @ 2015-05-01 17:06 丶Blank 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
posted @ 2015-05-01 14:06 丶Blank 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note... 阅读全文
posted @ 2015-04-23 21:40 丶Blank 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 24 下一页