An array A of n distinct numbers are said to be unimodal ifthere exists an index k, 1 ≤ k ≤ n, such that A[1] < A[2] < ·· · < A[k − 1] < A[k] and A[k] > A[k + 1] > · · · >A[n]. In other words, A has a unique peak and are monotone on bothsides of the peak. Design an efficient algorithm that finds thepeak in a unimodal array of size n.