Pergunta de entrevista da empresa Mastercard

Solve a leet code problem (easy-medium)