Your question is Basic 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.
A MONOPOLY GO! leaderboard stores player scores in strictly increasing order. Given the sorted scores and a target score, return the index of the target using binary search. Return -1 if the target is not present.
Implement search_score(scores, target).
scores is a list of integers sorted in strictly increasing order.target is an integer score to locate.0 through len(scores) - 1 when target exists.-1 when target does not exist.scores.def search_score(scores, target):