Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. class Solution { public: int romanToInt(string s) { ] = {'I','V','X','L','C','D','M'}; ] = {,,,,,,}; unordered_map<char,int> map; map.insert(…