Pregunta de entrevista de Pinterest

How would you solve this problem more efficiently?

Respuesta de la entrevista

Anónimo

8 sept 2024

The answer was with a hashmap, but I didn't know that at the time.