码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
Container With Most Water
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:其他好文   时间:2014-06-04 21:09:33    阅读次数:307
Merge k Sorted Lists
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity./***Definitionforsingly-linkedlist.*structListNode{*in...
分类:其他好文   时间:2014-06-04 21:08:57    阅读次数:381
Remove Duplicates from Sorted List II
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:其他好文   时间:2014-06-04 20:19:49    阅读次数:282
Multiply Strings
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:其他好文   时间:2014-06-04 20:19:04    阅读次数:313
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-06-04 20:17:05    阅读次数:249
Edit Distance
Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You have the fol...
分类:其他好文   时间:2014-06-04 20:12:15    阅读次数:199
Scramble String
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2014-06-04 20:11:38    阅读次数:303
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...
分类:其他好文   时间:2014-06-04 20:09:47    阅读次数:266
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], [1...
分类:其他好文   时间:2014-06-04 20:02:13    阅读次数:228
N-Queens
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:其他好文   时间:2014-06-04 20:00:47    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!