Step 1: Set left=0, right=4 (start and end indices)
Array: [4, 5, 1, 2, 3]
left=0 -> 4, right=4 -> 3
Why: We start searching between the whole array
Step 2: Calculate mid = Math.floor((0+4)/2) = 2, check value at mid=1
Array: [4, 5, 1, 2, 3]
left=0 -> 4, mid=2 -> 1, right=4 -> 3
Why: Mid helps us decide which half contains the minimum
Step 3: Compare mid value 1 with right value 3; since 1 < 3, move right to mid
Array: [4, 5, 1, 2, 3]
left=0 -> 4, right=2 -> 1
Why: Minimum must be at mid or to the left
Step 4: Calculate new mid = Math.floor((0+2)/2) = 1, mid value=5
Array: [4, 5, 1, 2, 3]
left=0 -> 4, mid=1 -> 5, right=2 -> 1
Why: Check middle of new search range
Step 5: Compare mid value 5 with right value 1; since 5 > 1, move left to mid+1
Array: [4, 5, 1, 2, 3]
left=2 -> 1, right=2 -> 1
Why: Minimum is to the right of mid
Step 6: Now left == right == 2, found minimum at index 2 with value 1
Array: [4, 5, 1, 2, 3]
Minimum = 1 at index 2
Why: Search narrowed to one element which is minimum
Result: Minimum value is 1 at index 2