Pregunta de entrevista de 8x8

General question on data structure, javascript and java.