Imagine an array of numbers where only single peak exists, how can you find such number and its index? The sequential search is probably the first solution comes to our mind. Can we do better? Yes…