LeanData Interview Question

Core Data structures related question.