Problem Description
The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and...
分类:
其他好文 时间:
2015-01-26 17:21:09
阅读次数:
137
How Big Is It?
Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box in...
分类:
其他好文 时间:
2015-01-26 17:05:21
阅读次数:
265
http://poj.org/problem?id=1094
Description
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to larges...
分类:
编程语言 时间:
2015-01-25 19:39:31
阅读次数:
185
DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the...
分类:
其他好文 时间:
2015-01-24 21:20:31
阅读次数:
219
寻找素数因子要求用书中的smallest-divisor过程找出199, 1999, 19999的最小因子。Scheme Code:主要流程:定义寻找素数的过程如果2的平方即4,大于测试值,那么它肯定是素数如果n能和2整除,那么不是素数,最小因子是2如果不是,回到过程find-div,再试试能不能与...
分类:
其他好文 时间:
2015-01-23 19:56:37
阅读次数:
214
寻找素数因子要求用书中的smallest-divisor过程找出199, 1999, 19999的最小因子。Scheme Code:主要流程:定义寻找素数的过程如果2的平方即4,大于测试值,那么它肯定是素数如果n能和2整除,那么不是素数,最小因子是2如果不是,回到过程find-div,再试试能不能与...
分类:
编程语言 时间:
2015-01-23 17:50:51
阅读次数:
228
Question:GiventwosortedarraysA,Bofsizemandnrespectively.Findthek-thsmallestelementintheunionofAandB.Youcanassumethattherearenoduplicateelements.http://leetcode.com/2011/01/find-k-th-smallest-element-in-union-of.htmlAspecialcase:Medianoftwosortedarrayshttps:..
分类:
其他好文 时间:
2015-01-19 11:05:14
阅读次数:
214
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will return the next smallest number in the BST.
Note: next()...
分类:
其他好文 时间:
2015-01-16 16:50:57
阅读次数:
152
题目:
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will return the next smallest number in the BST.
Note:...
分类:
编程语言 时间:
2015-01-14 18:01:28
阅读次数:
182
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Calling next() will
return the next smallest number in the BST.
Note: next() a...
分类:
编程语言 时间:
2015-01-13 14:25:39
阅读次数:
240