input: Write a python function to convert a Roman numeral string to its decimal equivalent.
  assert romanToDecimal('XXII') == 22
  assert romanToDecimal('IV') == 4
  assert romanToDecimal('MCMXCIV') == 1994
  assert romanToDecimal('CDXLIV') == 444
output: def romanToDecimal(s):
      roman = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
      total = 0
      prev_value = 0
      
      for char in s[::-1]:
          value = roman[char]
          if value < prev_value:
              total -= value
          else:
              total += value
          prev_value = value
      
      return total