0013. Roman to Integer
Character-by-character conversion with subtraction rule detection
Left-to-Right
Right-to-Left
Compare Both
I
1
V
5
X
10
L
50
C
100
D
500
M
1000
Roman Numeral:
Start
III (3)
IV (4)
IX (9)
LVIII (58)
MCMXCIV (1994)
MMMCMXCIX (3999)
Play
Step
Reset
Speed:
5
Processing direction:
-->
Left to Right
Running Total
0
Press Start to begin...
Processing direction:
<--
Right to Left
Running Total
0
Press Start to begin...
Side-by-side comparison of both approaches
Left-to-Right
Total: 0
Right-to-Left
Total: 0
Both approaches produce the same result.