Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-07-12 00:15:07
阅读次数:
268
Given a sorted array that has been rotated serveral times. Write code to find an element in this array. You may assume that the array was originally s...
分类:
其他好文 时间:
2014-07-11 23:02:53
阅读次数:
254
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100"class Solution {public: string addBinary(stri...
分类:
其他好文 时间:
2014-07-11 20:05:47
阅读次数:
224
exists keydel key1 key2Redis 的vauleredis 提供五种数据类型:string,hash,list,set 及sorted set。string 是最基本的类型,而且string 类型是二进制安全的。意思是redis 的string 可以包含任何数据。比如jpg 图...
分类:
其他好文 时间:
2014-07-11 12:38:31
阅读次数:
239
大部分人都知道redis是一款用在缓存服务器上的软件,它与memcache类似,都可以存储海量的数据,用在大访问量的web网站、聊天记录存放等方面,但是又与memcache不同:1、缓存数据可以持久化,没有缓存时间限制2、支持更多的数据类型:string、list 、set 、sorted set ...
分类:
Web程序 时间:
2014-07-11 10:33:37
阅读次数:
208
1.利用荷兰国旗的思路,每次记住最后一个位置,遇到一个不重复的数,放在它后面,代码很简单。Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the...
分类:
编程语言 时间:
2014-07-11 09:42:49
阅读次数:
238
http://blog.csdn.net/pickless/article/details/9191075Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7migh...
分类:
其他好文 时间:
2014-07-11 09:14:04
阅读次数:
222
Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if ...
分类:
其他好文 时间:
2014-07-11 09:09:33
阅读次数:
211
LINUX环境下多线程编程肯定会遇到需要条件变量的情况,此时必然要使用pthread_cond_wait()函数。但这个函数的执行过程比较难于理解。
pthread_cond_wait()的工作流程如下(以MAN中的EXAMPLE为例):
Consider two shared variables x and y, protected by the mutex mut,...
分类:
其他好文 时间:
2014-07-10 19:50:36
阅读次数:
347
题目:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or eq...
分类:
其他好文 时间:
2014-07-10 14:41:23
阅读次数:
177