Pergunta de entrevista da empresa Reddit

A question on data structure pros and cons.