Slack interview question

Technical question on data structure and memory allocation