Use a sorted range or a monotonic condition to discard half the search space at each step. Check loop boundaries and termination carefully.
Read each problem freely. Sign in to run your code, submit solutions, and track your progress.