Pergunta de entrevista da empresa PLAYSTUDIOS

How would you implement a function where you can convert Roman numerals to integers?