Apple Interview Question

Classic cantilever bean problem like usual