Bloomberg Interview Question

LC medium graph and DP