Qualtrics interview question

It was a hackerrank question.