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-06-27 13:03:49
阅读次数:
136
Given an array of integers, find two numbers such that they add up to a specific target number.
分类:
其他好文 时间:
2014-06-27 12:59:50
阅读次数:
176
Divide two integers without using multiplication, division and mod operator.
分类:
其他好文 时间:
2014-06-27 12:50:12
阅读次数:
253
Given a linked list, swap every two adjacent nodes and return its head.
分类:
其他好文 时间:
2014-06-27 12:42:55
阅读次数:
198
Given two numbers represented as strings, return multiplication of the numbers as a string.
分类:
其他好文 时间:
2014-06-27 12:38:25
阅读次数:
169
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-27 12:30:39
阅读次数:
204
Given two integers
n and k, return all possible combinations of k numbers out of 1 ...
n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3...
分类:
其他好文 时间:
2014-06-26 14:06:02
阅读次数:
252
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4
5 6 7 0 1 2).
You are given a target value to search. If found in the array retur...
分类:
其他好文 时间:
2014-06-26 13:58:53
阅读次数:
203
merge two array by order...
分类:
编程语言 时间:
2014-06-26 08:16:05
阅读次数:
246
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-06-26 07:09:01
阅读次数:
213