上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: code第一部分数组:第九题 四个元素之和为给定目标 Given an array S of n integers, are there elements a, b, c, and d in S such that a+b+c+d = target?Find all unique quadruple 阅读全文
posted @ 2017-02-25 22:07 taoliu_alex 阅读(207) 评论(0) 推荐(0) 编辑
摘要: code第一部分数组:第八题 三个元素和最接近给定目标 Given an array S of n integers, find three integers in S such that the sum is closest to a given number,target. Return the 阅读全文
posted @ 2017-02-25 22:06 taoliu_alex 阅读(168) 评论(0) 推荐(0) 编辑
摘要: code第一部分数组:第七题 给定数组三个元素求和为0 Given an array S of n integers, are there elements a, b, c in S such that a+ b+ c = 0? Find all uniquetriplets in the arra 阅读全文
posted @ 2017-02-25 22:05 taoliu_alex 阅读(356) 评论(0) 推荐(0) 编辑
摘要: code第一部分数组:6 数组中最长连续序列 Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example, Given [100, 4, 2 阅读全文
posted @ 2017-02-25 22:03 taoliu_alex 阅读(265) 评论(0) 推荐(0) 编辑
摘要: code第一部分数组:两个有序数组的中位数 there are two sorted arrays A and B of size m and n respectively. Find the median of the two sortedarrays. the overall run time 阅读全文
posted @ 2017-02-25 22:02 taoliu_alex 阅读(168) 评论(0) 推荐(0) 编辑
摘要: code第一部分:数组, 在反转数组中查找,有重复数据 Would this affect the run-time complexity? How and why?Write a function to determine if a given target is in the array. 分析 阅读全文
posted @ 2017-02-25 22:00 taoliu_alex 阅读(187) 评论(0) 推荐(0) 编辑
摘要: code第一部分:数组:在反转数组中查找 在反转数组中查找,无重复数据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 阅读全文
posted @ 2017-02-25 21:59 taoliu_alex 阅读(459) 评论(0) 推荐(0) 编辑
摘要: code第一部分数组:从有序数组中移除重复的数据 第二题 从有序数组中移除重复的数据,但是可以保留2个重复的数。For example, Given sorted array A = [1,1,1,2,2,3],Your function should return length = 5, and 阅读全文
posted @ 2017-02-25 21:55 taoliu_alex 阅读(308) 评论(0) 推荐(0) 编辑
摘要: code第一部分:数组 都说写代码一定要自己尝试,看再多也没有,确实是的;之前写过很多,感觉可以分享给大家的就放到博客上,希望激励自己好好敲代码。共勉吧! 之前一段时间把关于数组部分的内容做了一些;每周我会集中上传一次;任务量还是很大的;废话不多说,开始! 首先我把题目按照大的分类,总结起来了,这一 阅读全文
posted @ 2017-02-25 21:50 taoliu_alex 阅读(413) 评论(0) 推荐(0) 编辑
摘要: redis源码分析4 结构体 跳跃表 跳跃表是一种有序的数据结构,他通过在每个节点中维持多个指向其他节点的指针,从而达到快速访问节点的目的; 跳跃表支持平均O(logN),最坏O(N)复杂度的节点查找,还可以通过顺序性操作来批量处理节点。性能上和平衡树媲美,因为事先简单,常用来代替平衡树。 在red 阅读全文
posted @ 2017-01-30 21:21 taoliu_alex 阅读(1566) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页