Programiz Python Complex Data Structures Interview Question