i***0 发帖数: 37 | 1 【 以下文字转载自 JobHunting 讨论区 】
发信人: iq300 (iq300), 信区: JobHunting
标 题: If using C++, please avoid the use of STL for these questions.
发信站: BBS 未名空间站 (Wed Mar 5 17:26:08 2008)
If using C++, please avoid the use of STL for these questions.
Array Rotation
You should be able to do this in less than linear time.
Implement the following function, FindSortedArrayRotation, which takes as
its input an array of unique integers that has been sorted in ascending
order, then rotated by an unknown amount X wher | s*******d 发帖数: 59 | 2 unique numbers, 这样通过两分法来找时,可以确定最小值在那一边。
相似的一个问题是找抛物线的顶点。 | p***o 发帖数: 1252 | 3 嗯,其实这题用来考STL比现在这样不让用STL要难。
【在 s*******d 的大作中提到】 : unique numbers, 这样通过两分法来找时,可以确定最小值在那一边。 : 相似的一个问题是找抛物线的顶点。
|
|