码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
[LeetCode]88.Merge Sorted Array
【题目】 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 to m + n) to hold additional elem...
分类:其他好文   时间:2015-01-05 22:01:41    阅读次数:238
[LeetCode]Find Minimum in Rotated Sorted Array II
Follow up for "Find Minimum in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Suppose a sorted array is rotated at some pivot u...
分类:其他好文   时间:2015-01-05 18:49:03    阅读次数:105
使用Jedis操作redis
Redis是一个开源的Key-Value数据缓存,和Memcached类似。Redis多种类型的value,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hash(哈希类型)。Jedis 是 Redis 官方首选的 Java 客户端开发...
分类:其他好文   时间:2015-01-05 12:42:51    阅读次数:117
[LeetCode]88 Merge Sorted Array
https://oj.leetcode.com/problems/merge-sorted-array/http://blog.csdn.net/linhuanmars/article/details/19712333publicclassSolution{ publicvoidmerge(intA[],intm,intB[],intn){ //SolutionA: //merge_NoExtraSpace(A,m,B,n); //SolutionB: merge_ExtraSpace(A,m,B,n);..
分类:其他好文   时间:2015-01-05 07:14:31    阅读次数:141
【leetcode】Remove Duplicates from Sorted Array II
Remove Duplicates from Sorted Array IIFollow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =...
分类:其他好文   时间:2015-01-04 22:56:14    阅读次数:289
[LeetCode] Search a 2D Matrix
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:其他好文   时间:2015-01-04 22:48:33    阅读次数:222
[LeetCode]Find Minimum in Rotated Sorted Array
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). Find the minimum element. You may assume no duplicate exists in ...
分类:其他好文   时间:2015-01-04 21:32:18    阅读次数:145
[LeetCode] Median of Two Sorted Arrays
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 O(log (m+n)). public class Solution { pu...
分类:其他好文   时间:2015-01-04 21:25:03    阅读次数:150
[LeetCode]80 Remove Duplicates from Sorted Array II
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array-ii/http://blog.csdn.net/linhuanmars/article/details/24343525publicclassSolution{ publicintremoveDuplicates(int[]A){ if(A==null) return-1;//invalidinput if(A.length==0||A.length==1) retur..
分类:其他好文   时间:2015-01-04 19:32:41    阅读次数:133
[LeetCode]81 Search in Rotated Sorted Array II
https://oj.leetcode.com/problems/search-in-rotated-sorted-array-ii/http://blog.csdn.net/linhuanmars/article/details/20588511publicclassSolution{ publicbooleansearch(int[]A,inttarget){ if(A==null||A.length==0) returnfalse; returnfind(A,0,A.length-1,target); ..
分类:其他好文   时间:2015-01-04 19:31:08    阅读次数:133
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!