Roman To Integer

Given a roman numeral, convert it to an integer.

Input is guaranteed to be within the range from 1 to 3999.

Read more details about roman numerals at Roman Numeric System

Example :

Input : "XIV"
Return : 14
Input : "XX"
Output : 20
Interview Code Editor
  • Solution Approach
  • Complete Solution
8240 successful submissions.
Asked In:
  • Amazon
  • Facebook
  • Microsoft
  • Twitter
Click here to jump start your coding interview preparation