LeanData interview question

Core Data structures related question.