Roman to Integer
Given a Roman numeral, convert it to an integer.
Constraints
1 <= s.length <= 15
s contains only the characters I, V, X, L, C, D, M
s is a valid Roman numeral in the range [1, 3999]
Examples
Input: s = "III" Output: 3
Input: s = "MCMXCIV" Output: 1994
Practise this challenge
All coding challenges
LetsDiscuss
Loading your session…