Question d’entretien chez Unity

Solve the provided programming challenge with an efficient solution.