Unity interview question

Solve the provided programming challenge with an efficient solution.