Number of comparisons to find the largest element, in the worst case = \( logn \). Number of comparisons to find the element in the increasing part of the array = \( log(n_1) \). Number of comparisons to find the element in the decreasing part of the array = \( log(n_2) \). where \( n_1+n_2 = n \) = number of elements in the array \( \therefore \) Total number of comparisons = \( 3logn \).