Braze interview question

I'm guessing some typical HackerRank question.