Back to problems

League Earnings

Algorithm · Point72 · Easy

You are evaluating the revenue potential of football clubs. Three parallel arrays describe clubs from several leagues: leagues[i] identifies the league containing club i. stadiumCapacities[i] gives club i's stadium capacity. silverwareCounts[i] records the total trophies won by club i. The arrays are equal in length. For a targetLeague, which is guaranteed to occur at least twice in leagues, determine that league's total earnings and its average earnings per match. The…

Checking your access…