码迷,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...
分类:其他好文   时间:2015-02-09 15:32:58    阅读次数:146
leetcode[80]Remove Duplicates from Sorted Array II
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:其他好文   时间:2015-02-09 15:24:59    阅读次数:125
【python】字符排序
一、摘要 最近在做一个排序的东西,被python的字符串编码格式折腾了一会儿,总结下二、排序英文排序不用说,sort sorted 比较好,内部已经实现主要是中文,方法是查表获取拼音再进行排序。但编码格式很让人无奈,utf-8是1个字节,unicde是2个字节,在打印获取数据的过程中很无奈。enc....
分类:编程语言   时间:2015-02-09 12:42:39    阅读次数:193
7. Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:其他好文   时间:2015-02-09 09:23:32    阅读次数:176
leetcode[153]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...
分类:其他好文   时间:2015-02-09 00:44:49    阅读次数:135
leetcode[154]Find Minimum in Rotated Sorted Array II
Follow upfor "Find Minimum in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Suppose a sort...
分类:其他好文   时间:2015-02-09 00:37:00    阅读次数:166
leetcode[164]Maximum Gap
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:其他好文   时间:2015-02-09 00:32:20    阅读次数:257
(35)Search Insert Position
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:其他好文   时间:2015-02-08 23:14:45    阅读次数:176
leetcode[163]Missing Ranges
Given a sorted integer array where the range of elements are [lower,upper] inclusive, return its missing ranges.For example, given[0, 1, 3, 50, 75],lo...
分类:其他好文   时间:2015-02-08 23:10:57    阅读次数:290
(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 ord...
分类:其他好文   时间:2015-02-08 21:51:57    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!