Dozee interview question

Data Structures