Summer Sale
Limited Time Deal: Unlock all premium questions for over 30% off
14
:
03
:
43
:
51
Rating Cutoff For Loss Rate
A game analytics platform needs to identify a skill rating threshold above which players lose at least a target proportion of their games. You are given a list matches where each element is [rating_str, result]: rating_str is a non-negative integer encoded as a string, and result is either "win" or "lose". Find the smallest non-negative integer cutoff s such that among all matches with rating >= s, the proportion of losses is at least threshold.
Return -1 if no valid cutoff exists. A cutoff is invalid if there are no matches with rating >= s.
...
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.