Luminovo interview question

optimization and probability