码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
Leetcode:merge_sorted_array
将给定的两个排好序的数组合并成一个有序数组...
分类:其他好文   时间:2014-10-11 03:08:44    阅读次数:134
leetcode 二分查找 Search for a Range
Search for a Range  Total Accepted: 21480 Total Submissions: 78454My Submissions Given a sorted array of integers, find the starting and ending position of a given target value. Your algo...
分类:其他好文   时间:2014-10-11 00:15:07    阅读次数:197
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-10-10 23:59:54    阅读次数:226
leetcode 二分查找 Search in Rotated Sorted Array
题意:一个已经排序好的数组,被按某个位置旋转了一次,给定一个值target,在该旋转后的数组里查找该值。 思路:二分查找 难点在于确定往数组的哪一半段继续二分查找 设起点、中间点、终点分别为 start、middle、end (采用前闭后开的区间表示方法 如果target = A[middle] return middle 如果A[middle] >= A[start],则[start,...
分类:其他好文   时间:2014-10-10 23:15:44    阅读次数:219
leetcode 二分查找 Search in Rotated Sorted ArrayII
Search in Rotated Sorted Array II  Total Accepted: 18500 Total Submissions: 59945My Submissions Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this...
分类:其他好文   时间:2014-10-10 21:35:14    阅读次数:239
LeetCode-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 fo...
分类:其他好文   时间:2014-10-10 20:19:34    阅读次数:176
LeetCode Search in Rotated Sorted Array II
Search in Rotated Sorted Array II  Total Accepted: 18488 Total Submissions: 59914My Submissions Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this...
分类:其他好文   时间:2014-10-10 17:26:24    阅读次数:122
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-10-10 16:26:13    阅读次数:141
NSObject的performSelector: withObject: withObject:使用简介
-(id)performSelector:(SEL)aSelector withObject:(id)anObject withObject:(id)anotherObjectDescription[说明]Sends a message to the receiver with two object...
分类:其他好文   时间:2014-10-10 16:00:50    阅读次数:223
Interview Q&A - 什么是多态?
Polymorphism is often referred to as the third pillar of object-oriented programming, after encapsulation and inheritance. It has two distinct aspects: At run time, objects of a derived class may...
分类:其他好文   时间:2014-10-10 14:05:54    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!