1.二分查找算法function two_find($arr,$low,$height,$k){ if($low<=$height){ $mid = intval(($low+$height)/2); if($arr[$mid]==$k){ r...
分类:
Web程序 时间:
2014-09-09 15:54:28
阅读次数:
197
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".字符串相加,不难个人思路:1,尾部对齐,然后逐位相加,flag记为进位代码: 1 #inclu...
分类:
其他好文 时间:
2014-09-09 15:26:58
阅读次数:
213
Median of Two Sorted Arrays...
分类:
其他好文 时间:
2014-09-09 13:29:48
阅读次数:
158
Divide Two Integers
Divide
two integers without using multiplication, division and mod operator.
分析:...
分类:
其他好文 时间:
2014-09-09 13:01:42
阅读次数:
164
我觉着写得比看到的答案更清晰~
class Solution {
public:
TreeNode *ltob(ListNode *head, ListNode *end) {
if(head == end) {
TreeNode * node = new TreeNode(head->val);
return node;...
分类:
其他好文 时间:
2014-09-09 12:56:58
阅读次数:
166
[leetcode]Add Two Numbers...
分类:
其他好文 时间:
2014-09-09 12:50:08
阅读次数:
185
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2014-09-09 12:23:58
阅读次数:
176
关于Redis,下面来自百度百科:redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hashs(哈希类型)。这些数据类型都支持push...
分类:
Web程序 时间:
2014-09-09 12:02:58
阅读次数:
294
OpenStack nova compute supports two flavors of Virtual Machine (VM) migration:Cold migration -- migration of a VM which requires the VM to be powered ...
分类:
其他好文 时间:
2014-09-09 11:35:18
阅读次数:
343