思路:将每个链表的头存在最小堆中,每次取堆首,然后将取出节点的下一个放入堆中中。 1 class cmp{ 2 public: 3 bool operator()(ListNode* l1,ListNode* l2) 4 { 5 return l1->val>l2-...
分类:
其他好文 时间:
2015-05-05 10:29:37
阅读次数:
163
NoSQL 使用场景:1.对数据高并发读写2.对海量数据的高效率存储和访问3.对数据的高可扩展性和高可用性Redis 通常被称为数据结构服务器,因为键可以包含字符串(strings)、哈希(hashes)、链表(lists)、集合(sets)和有序集合(sorted sets)。链表可以做成栈(先进...
分类:
其他好文 时间:
2015-05-04 23:46:38
阅读次数:
262
git clone
git fetch
git merge
git pull
git push
git add
git commit
git rebase
git branch
git checkout...
分类:
其他好文 时间:
2015-05-04 22:08:22
阅读次数:
126
总共五种数据类型:1、Strings - 字符串127.0.0.1:6379> set name "zhaoja"OK127.0.0.1:6379> get name"zhaoja"2、Hashes - 哈希值3、Lists - 列表Redis的列表是简单的字符串列表,排序插入顺序。可以添加元素到R...
分类:
其他好文 时间:
2015-05-04 19:30:51
阅读次数:
121
1, array_merge出来的数组,和以前的数组没有关系,会生成一个新的数组,返回值。2, 数组的下标是分大小写的========$_GET['A'] = 'A';$_GET['a'] = 'a';$_POST['C'] = 'C';$_POST['c'] = 'c';$arr = array_...
分类:
其他好文 时间:
2015-05-04 13:47:29
阅读次数:
101
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.解题思路一:之前我们有mergeTwoLists(ListNode l1, ListNode l2)方法...
分类:
编程语言 时间:
2015-05-03 17:25:06
阅读次数:
272
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.解题思路:新建一个...
分类:
编程语言 时间:
2015-05-03 13:18:58
阅读次数:
134
https://leetcode.com/problems/add-two-numbers/You are given two linked lists representing two non-negative numbers. The digits are stored in reverse o...
分类:
其他好文 时间:
2015-05-03 11:48:50
阅读次数:
122
一、首先是 :
git clone
例如是:
git clone http://github.com/你的账户/你的代码仓库.git
然后就能得到git 的本地仓库,在任何文件夹建立都可以。得到的就是其代码仓库;
二、然后是:
对其进行修改,会用到:git add . ; git commit -m "" ; git diff 等等; 命令详见我的其他的博文,很详细得...
分类:
其他好文 时间:
2015-05-03 10:43:20
阅读次数:
134
利用git 的分支管理的能力实现更有章法的协同开发的模式;
其实在我们进行 git init 时就创建了 master 的主分支;
那现在我如何建立第二个分支呢?
:git branch local
初始时分支的内容是完全和主分支是一样的,在分支中所有的操作都不影响主分支里的情况,你可以在其中做任何修改;
如何查看分支呢?
:git branch
local
* mast...
分类:
其他好文 时间:
2015-05-03 10:40:16
阅读次数:
153