BetVictor Interview Question

Time or algorithm complexity calculation