yhangry interview question

Question on my take home assignment