Pergunta de entrevista da empresa Riot Games

Had me build out a fairly simple algorithm.