Angi interview question

Code pairing on a hackerank challenge