Intel Corporation interview question

Solve problem one HW one SW