BUG LAB · Binary search
The discarded minimum
This rotated minimum search keeps a closed interval. Which input discards the true minimum?
Java · intentionally broken snippet
if (nums[mid] > nums[right]) left = mid + 1;
else right = mid - 1;
// Eventually return nums[left].Assume ordinary supporting code and valid inputs unless the question states otherwise.
Choose an answer before revealing the trace. Keys 1 to 3 work too.