BetVictor interview question

Time or algorithm complexity calculation