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 O(log (...
分类:
其他好文 时间:
2014-08-27 14:47:18
阅读次数:
148
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example,Given n = 3,You should return the following...
分类:
其他好文 时间:
2014-08-26 19:19:56
阅读次数:
165
题目:Partition ListGiven a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should p...
分类:
其他好文 时间:
2014-08-26 13:08:16
阅读次数:
401
In one well-known algorithm of finding the k-th order statistics we should divide all elements into groups of five consecutive elements and find the median
of each five. A median is called the middl...
分类:
其他好文 时间:
2014-08-25 22:50:55
阅读次数:
297
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路: 1 cla...
分类:
其他好文 时间:
2014-08-25 18:38:04
阅读次数:
211
Problem DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to e...
分类:
其他好文 时间:
2014-08-23 15:15:40
阅读次数:
234
The ProblemWrite a function that takes two parameters n and k and returns the value of Binomial Coefficient C(n, k).For example, your function should ...
分类:
其他好文 时间:
2014-08-23 12:41:20
阅读次数:
169
LeetCode: Single NumberGiven an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a...
分类:
其他好文 时间:
2014-08-23 12:38:10
阅读次数:
212
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array A = [1,1,1,2,2,3],Your function should r...
分类:
其他好文 时间:
2014-08-23 11:18:00
阅读次数:
167
[转载]英文原文:The 10 Things You Should Do When You Have Your Next Web Idea 当你正和家人享受一个悠闲的午后,一个不错的想法突然出现在你的脑海里。不管它是一个 App 还是服务,或是一个新的概念。只要你把这个想法付诸实践,它就可能会...
分类:
其他好文 时间:
2014-08-22 19:25:09
阅读次数:
185