分治法
public static int Pro1_4_18(int[] a, int lo, int hi){ //[lo,hi) if(hi-lo<3) return 0; int mid = lo + (hi-lo)/2; if(a[mid-1]>a[mid]&&a[mid+1]>a[mid]) return mid; int Left = Pro1_4_18(a, lo, mid); if(Left!=0) return Left; int Right = Pro1_4_18(a, mid, hi); if(Right!=0) return Right; return 0; }