Reddit interview question

Simple questions about data structures