Your question is Python Algorithm Implementation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Motion Recruitment Partners stores candidate assessment scores in nondecreasing order. Implement a function that returns the index of the first occurrence of a target score using binary search. Return -1 when the target does not appear.
If the target occurs multiple times, return the smallest valid index. The input list must not be modified.
scores, a sorted list of integers, and target, an integer.scores[index] == target, or -1 if no such index exists.def find_first_score(scores, target):