Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Roman to Integer
Bookmark
Input
Simple
Standard
Complex
Subtraction
Mixed
Custom
s
=
III
I
I
I
1
1
1
result = 0
I
I
I
1
1
1
result = 0
I
I
I
i
1
1
1
result = 0
I
I
I
i
1
1
1
1 ≥ 1
result = 0
I
I
I
i
1
1
1
result = 1
+1
1
I
I
I
i
1
1
1
result = 1
1
I
I
I
i
1
1
1
result = 2
+1
1
+
1
I
I
I
i
1
1
1
result = 2
1
+
1
I
I
I
i
1
1
1
result = 2
1
+
1
I
I
I
i
1
1
1
result = 3
+1
1
+
1
+
1
I
I
I
1
1
1
result = 3
1
+
1
+
1
= 3
algo
master
.
io
Step:
Scan left to right, adding each symbol's value
0 / 10
Input
Simple
Standard
Complex
Subtraction
Mixed
Custom
s
=
III
0 / 10
algo
master
.
io
Step:
Scan left to right, adding each symbol's value