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-08-09 11:38:57
阅读次数:
147
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without u...
分类:
其他好文 时间:
2014-08-05 22:35:00
阅读次数:
277
题目再现
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 O(log (m+n)).
题意解析...
分类:
其他好文 时间:
2014-08-02 18:24:13
阅读次数:
335
Single Number II
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?...
分类:
其他好文 时间:
2014-08-02 12:53:53
阅读次数:
289
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-07-31 12:14:56
阅读次数:
222
Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.题意:对k个有序的链表进行归并排序。并分析其复杂度。/** * Definition for singly-...
分类:
其他好文 时间:
2014-07-29 11:02:16
阅读次数:
205
题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBE....
分类:
编程语言 时间:
2014-07-28 14:42:23
阅读次数:
264
题目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 b...
分类:
其他好文 时间:
2014-07-27 22:49:39
阅读次数:
176
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-07-27 09:53:12
阅读次数:
350
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA...