Back to problems

K Highest Probability Winners in Lottery System

Algorithm · Amazon · Easy

A lottery assigns each participant a winning chance that increases linearly with the amount they spend. Given an integer k, return the k participants whose chances of winning are greatest. Example The participant who spent 45 has the largest listed probability, 0.6, so it is the only returned entry.

Checking your access…