DEV Community

Roman To Integer

k@k on December 30, 2019

Topic | Difficulty | Companies Mathematical Algorithms| Medium | Amazon|Microsoft|Facebook|Twitter Given a string S r...
Collapse
 
dramaticbean profile image
DramaticBean🇵🇹

A few years ago I had an exercise like this one given to me by my teacher where I had to converse, sum and subtract numbers in roman. I remember that a solution I found to do that was turning the numbers in roman to the values of I (1 in roman), so V = IIIII, X = IIIIIIIIII, etc.

Collapse
 
dance2die profile image
Sung M. Kim

Nice post kumaresan.

Can I request to format and highlight code snippets?

You can refer to the Editor Guide for more info.