Question: If the array is [1, 2, 3, 4, 5] and the target is 3, what will be the mid index during the first iteration of binary search?
Options:
Correct Answer: 2
Solution:
In the first iteration, mid is calculated as (0 + 4) // 2 = 2, which corresponds to the value 3.