Pregunta de entrevista de Mount Sinai Health System

How would you make this solution?