Apple Interview Question

Dynamic programming and memory allocation