OpenBet interview question

Explain how you would tackle this algorithm