Braze Interview Question

I'm guessing some typical HackerRank question.