码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
【leetcode刷题笔记】Search 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).You are given a target value t...
分类:其他好文   时间:2014-07-18 20:00:41    阅读次数:205
LA 4394
DescriptionThere are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. Wi...
分类:其他好文   时间:2014-07-18 17:12:31    阅读次数:252
LeetCode "Remove Duplicates from Sorted List"
The key of this problem is about details especially boundary conditions.class Solution {public: ListNode *deleteDuplicates(ListNode *head) { ...
分类:其他好文   时间:2014-07-18 14:36:54    阅读次数:189
LeetCode "Reorder List"
Not very hard to figure out the solution: splitting the list into 2 halves; reverse the 2nd half and interleave the two halves.But it takes some time ...
分类:其他好文   时间:2014-07-18 14:35:09    阅读次数:214
leetcode merge-sorted-array/
public class Solution { public void merge(int A[], int m, int B[], int n) { int a=m-1; int b=n-1; int index=m+n-1; whil...
分类:其他好文   时间:2014-07-18 12:06:55    阅读次数:147
POJ 1094: Sorting It All Out( 拓扑排序 )
Sorting It All Out Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 26866 Accepted: 9267 Description An ascending sorted sequence of distinct values...
分类:其他好文   时间:2014-07-18 11:33:31    阅读次数:294
Codeforces Round #256 (Div. 2) B
B. Suffix Structures Bizon the Champion isn't just a bison. He also is a favorite of the "Bizons" team. At a competition the "Bizons" got the following problem: "You are given two distinct w...
分类:其他好文   时间:2014-07-18 11:15:25    阅读次数:252
【leetcode】Combinations
Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2,3],...
分类:其他好文   时间:2014-07-18 09:37:55    阅读次数:161
【leetcode刷题笔记】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...
分类:其他好文   时间:2014-07-17 22:24:40    阅读次数:216
【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...
分类:其他好文   时间:2014-07-17 18:09:32    阅读次数:258
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!