UST interview question

Was asked to do a home assignment