Pregunta de entrevista de Proxify

Mainly buidling a function that should return a specific structure based on the input, so the solution must be optimal as the input can be very large