SteelThrough interview question

Data Structures and algorithm question