标签:int 区间 nta lint mount ntc which ret ogr
Half and Half 类型题
二分法的精髓在于判断目标值在前半区间还是后半区间,Half and Half类型难点在不能一次判断,可能需要一次以上的判断条件。
Maximum Number in Mountain Sequence
Given a mountain sequence of n
integers which increase firstly and then decrease, find the mountain top.
nums
= [1, 2, 4, 8, 6, 3]
return 8
Given nums
= [10, 9, 8, 7]
, return 10
标签:int 区间 nta lint mount ntc which ret ogr
原文地址:http://www.cnblogs.com/yidansheng/p/7675356.html