Quatt interview question

I did a Pair program coding