Bloomberg Interview Question

Maximum subarray problem, desing a caching mechanism