码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:其他好文   时间:2014-12-03 22:50:41    阅读次数:137
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 7might become4 5 6 7 0 1 2).Find the minimum element.You m...
分类:其他好文   时间:2014-12-03 11:54:09    阅读次数:175
[leetcode]Convert Sorted List to Binary Search Tree
问题描述: 基本思路: 代码: public TreeNode subSortedToBST(Vector vec, int begin ,int end) //Java { if(begin == end) { TreeNode node = new TreeNode(vec.get(begin));...
分类:其他好文   时间:2014-12-03 00:29:23    阅读次数:158
利用Redis有序集合开发普适的排行榜功能
作者:zhanhailiang 日期:2014-12-02 本文将讲解如何基本Redis Sorted Set实现排行榜功能? 首先,请参见Redis数据类型:http://redis.cn/topics/data-types.html 如上所见,Redis有序集合非常适用于有序不重复数据的存储,例如游戏开发中无处不在的排行榜,如等级排行榜,经验排行榜,积分排行榜,历...
分类:其他好文   时间:2014-12-02 22:34:21    阅读次数:248
LeetCode: Median of Two Sorted Arrays 解题报告
Median of Two Sorted ArraysThere are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run...
分类:其他好文   时间:2014-12-02 19:08:20    阅读次数:209
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 sho....
分类:其他好文   时间:2014-12-02 18:57:38    阅读次数:213
Find Minimum in Rotated Sorted Array
Find Minimum in Rotated Sorted Array...
分类:其他好文   时间:2014-12-01 22:34:20    阅读次数:235
[leetcode]Remove Duplicates from Sorted List II
问题描述: 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->3->3->4->4->5, return 1->2->5. Giv...
分类:其他好文   时间:2014-12-01 22:31:26    阅读次数:221
TStringList 的Sorted属性
1 、设置 sorted := true;2、添加数据add('3');add('4');add('1');showmessage(commatext);// 1,3,43、再修改Sorted属性 为 false ,前面已经添加的数据 不会恢复为添加时的顺序341添加新数据 add('5');4、s...
分类:其他好文   时间:2014-12-01 15:34:21    阅读次数:163
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 ...
分类:其他好文   时间:2014-11-30 19:56:07    阅读次数:103
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!