Amazon interview question

Classical prediction problem.