Pregunta de entrevista de Epic

How would you solve this problem: insert test case here.