OOZOU interview question

Got a take home assignment