Apple Interview Question

design lru followed by optimization