Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target valu...
分类:
其他好文 时间:
2014-08-22 23:43:39
阅读次数:
322
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:
其他好文 时间:
2014-08-22 22:22:09
阅读次数:
233
Given a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, ...
分类:
其他好文 时间:
2014-08-22 22:18:59
阅读次数:
342
1、redis简介
redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hashs(哈希类型)。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的。在此基础上,redis...
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2014-08-21 22:33:34
阅读次数:
240
Median of Two Sorted Arrays
Total Accepted: 17932 Total
Submissions: 103927My Submissions
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sort...
分类:
其他好文 时间:
2014-08-21 13:24:54
阅读次数:
206
1A! We get median of each array and compare them, then we know which half should be disguarded and how many should be disguarded.class Solution {publi...
分类:
其他好文 时间:
2014-08-21 13:13:24
阅读次数:
191
Question:Given a sorted array of n integers that has been rotated an unknown number of times, write code to find anelement in the array. You may assum...
分类:
其他好文 时间:
2014-08-21 02:46:43
阅读次数:
194
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 equal...
分类:
其他好文 时间:
2014-08-20 22:28:12
阅读次数:
244
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:
其他好文 时间:
2014-08-20 14:01:22
阅读次数:
210