logo
Interview
    Interview Guide
    Coding Problems List
Sponsored: Coursera
Problems

Roman to Integer

Problem

Given a roman numeral, convert it to an integer.

The answer is guaranteed to be within the range from 1 to 3999.

Example

IV -> 4
XII -> 12
XXI -> 21
XCIX -> 99

Note

What is Roman Numeral?

Online Judge