Reddit interview question

A question on data structure pros and cons.