Step 1: Set left=0, right=4 (start and end indices)
array: [4, 5, 1, 2, 3], left=0, right=4
Why: We start searching between the whole array
Step 2: Calculate mid = (0 + 4) // 2 = 2, check array[mid]=1
array: [4, 5, 1, 2, 3], left=0, mid=2, right=4
Why: Mid helps us decide which half to search next
Step 3: Compare array[mid]=1 with array[right]=3; since 1 < 3, move right to mid=2
array: [4, 5, 1, 2, 3], left=0, right=2
Why: Minimum must be at mid or to the left because mid is smaller than right
Step 4: Calculate mid = (0 + 2) // 2 = 1, check array[mid]=5
array: [4, 5, 1, 2, 3], left=0, mid=1, right=2
Why: Narrowing down the search to find the smallest element
Step 5: Compare array[mid]=5 with array[right]=1; since 5 > 1, move left to mid+1=2
array: [4, 5, 1, 2, 3], left=2, right=2
Why: Minimum must be to the right of mid because mid is greater than right
Result: array: [4, 5, 1, 2, 3], left=2, right=2 -> minimum is array[2] = 1