Find Minimum in Rotated Sorted Array

Learning 1D Array Binary Search DSA practice problem on Onlearn.

Difficulty: medium.

Topics: Find the minimum element in a rotated sorted array with distinct elements, Arrays, Linear Search, Binary Search, Time Complexity, Space Complexity, Rotated Sorted Array, array properties, search space optimization, search algorithms, binary search, time complexity analysis.

Problem Statement: Given an integer array arr of size N, sorted in ascending order (with distinct values). Now the array is rotated between 1 to N times which is unknown. Find the minimum element in the array. Input Specification: An integer array arr. Output Specification: The minimum element in the array. Examples: Example 1: Input: arr = [4,5,6,7,0,1,2,3] Output: 0 Explanation: The element 0 is the minimum element in the array. Example 2: Input: arr = [3,4,5,1,2] Output: 1 Explanation: The element 1 is the minimum element in the array.