Petuum Interview Question

algorithm problem