Approach Explanation ( •̀ ω •́ )✧
- I used binary search because the array is sorted but rotated.
- At each step, I checked which half (left or right) was sorted.
- If the target lay inside the sorted half, I searched there.
- Otherwise, I searched in the other half.
- This continued until I either found the target or exhausted the search space.
Method Used: ( ̄︶ ̄)↗
- Binary search adaptation
- Range checks
- Efficient narrowing

Top comments (0)