Pergunta de entrevista da empresa Meta

Basic question on hashmaps and arrays.