Slack Interview Question

Technical question on data structure and memory allocation