Riot Games Interview Question

Had me build out a fairly simple algorithm.