Apple Interview Question

data structure problem and system design