码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
leetcode之Median of Two Sorted Arrays
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 (...
分类:其他好文   时间:2014-08-27 14:47:18    阅读次数:148
LeetCode 34 Search for a Range
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 order of O(log n). If the target is not found in t...
分类:其他好文   时间:2014-08-27 13:05:17    阅读次数:226
LeetCode总结 -- 一维数据合并篇
合并是一维数据结构中很常见的操作, 通常是排序, 分布式算法中的子操作。 这篇总结主要介绍LeetCode中关于合并的几个题目: Merge Two Sorted ListsMerge Sorted ArraySort ListMerge k Sorted Lists我们先来看看两个有序一维数据的合并, 这里主要是要介绍链表的合并操作, 不过因为一维数组的合并也比较简单, 而且与链表有比较性, 就...
分类:其他好文   时间:2014-08-27 12:59:07    阅读次数:348
python学习
字典的排序:按键排序sorted(dic.iteritems(),key=lambdadic:dic[0],reverse=False)按值排序sorted(dic.iteritems(),key=lambdadic:dic[1],reverse=False)如果在继承关系中,父类中的字段是__fi...
分类:编程语言   时间:2014-08-27 08:10:37    阅读次数:276
poj 1094 Sorting It All Out (拓扑排序)
Sorting It All Out Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 27929   Accepted: 9655 Description An ascending sorted sequence of distinct values is on...
分类:其他好文   时间:2014-08-26 19:40:46    阅读次数:194
LeetCode Solutions : Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the...
分类:其他好文   时间:2014-08-26 17:19:16    阅读次数:191
[SQL Basics] Indexes
An index is used to speed up searching in the database.By default, when you create this table, your data will be stored on disk and sorted by the "Id"...
分类:数据库   时间:2014-08-25 22:30:34    阅读次数:407
Search in Rotated Sorted Array
Search in Rotated Sorted Array  Total Accepted: 22300 Total Submissions: 77945My Submissions Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 ...
分类:其他好文   时间:2014-08-25 21:15:35    阅读次数:227
Redis 缓存服务器
Redis 服务器Remote Dictionay Server Redis是一个key-value持久化产品,通常被称为数据结构服务器。Redis的key是string类型;value可以是string、hash、list、set、sorted set等类型;实际上,Redis内部会将key和va...
分类:其他好文   时间:2014-08-25 20:46:54    阅读次数:673
Merge Two Sorted Lists
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.思路: 1 cla...
分类:其他好文   时间:2014-08-25 18:38:04    阅读次数:211
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!