题目: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-18 16:02:32
阅读次数:
130
英文原文:http://redis.io/topics/introduction#introduction-to-redis
Redis是一个开源的,遵循BSD license的高性能键值缓存和存储.它经常被当作一个数据结构服务器,支持的数据类型包括strings,hashes,lists,sets,sorted sets,bitmaps和hyperloglogs.
你可以运行...
分类:
其他好文 时间:
2015-05-18 13:02:19
阅读次数:
131
Merge Sorted Array
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.
Note:
You may assume that nums1 has enough space (size that is greater or equal...
分类:
其他好文 时间:
2015-05-17 18:44:52
阅读次数:
100
ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) { if (l1 == NULL) return l2; if (l2 == NULL) return l1; ListNode *ret = NULL; ...
分类:
其他好文 时间:
2015-05-17 18:34:48
阅读次数:
95
自己今天也遇到这个问题,就百度了下出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用。而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况。解决方法:输入以下命令sudo rm /var/cache/apt/archives/locksudo rm /var/lib/d...
分类:
其他好文 时间:
2015-05-17 13:42:03
阅读次数:
113
https://leetcode.com/problems/insert-interval/Insert IntervalGiven a set ofnon-overlappingintervals, insert a new interval into the intervals (merge i...
分类:
编程语言 时间:
2015-05-16 18:07:58
阅读次数:
229
1. tuples: (3) -> 3 but (3,) indicates a tuple -> (3,) 2. tuples and lists: tuples:num = (1,2,3) (3,) 不可修改 num(1) = 4 -> 'error' lists:num = [1,...
分类:
编程语言 时间:
2015-05-16 11:48:34
阅读次数:
186
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initial...
分类:
编程语言 时间:
2015-05-15 21:13:28
阅读次数:
121
Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].解题思路:用两个指针s...
分类:
编程语言 时间:
2015-05-15 19:43:59
阅读次数:
180
Write a program to find the node at which the intersection of two singly linked lists begins.
For example, the following two linked lists:
A: a1 → a2
↘
...
分类:
其他好文 时间:
2015-05-15 09:13:01
阅读次数:
100