Pregunta de entrevista de Mastercard

Leetcode question regarding organizing roman numerals.