The problem, in one line. A sorted list of distinct numbers was spun so a front part moved to the back. Return the position of a target, or -1, in log time. LeetCode 33.
The tell. “Sorted, then rotated” and a search for a value. Plain binary search picks the wrong half here, so the work is finding a second rule for the middle.
Included with a plan
This solution is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.