Lintcode: Find a Peak - neverlandly - 博客园
There is an integer array which has the following features: * The numbers in adjacent positions are different. * A[0] < A[1] && A[A.length - 2] > A[A.length - 1]. We define a position P is a peek if A[P] > A[P-1] && A[P] > A[P+1].Read full article from Lintcode: Find a Peak - neverlandly - 博客园
No comments:
Post a Comment