#3

Roman to Integer

Easy
All Problems

3. Roman to Integer#13

Easy📊 Arrays & HashingLookup Table

Convert a Roman numeral string to an integer.

Examples

Example 1:
Input: ["III"]
Output: 3
Example 2:
Input: ["LVIII"]
Output: 58
Example 3:
Input: ["MCMXCIV"]
Output: 1994

Why learn this

Real-world mapping problem that teaches dictionary/hash map usage with edge cases.

StringsHash MapsLookup Tables
Python 3Loading Python engine...
Click "Run Code" to test your solution