Purdue University interview question

Calculations