PwC interview question

Motivation