What should you identify at each binary-search step?
Practice this question from Search in Rotated Sorted Array - Rotated search Pattern Practice Quiz, with options and an explanation.
Question
What should you identify at each binary-search step?
Option A — Correct answer
Which half is sorted and whether target lies inside it
Option B
Only the smallest value
Option C
Only duplicate count
Option D
Only array length parity
Explanation
Identify which half is sorted and whether the target lies inside it.