Recall & Review
beginner
What is the value of the Roman numeral 'X'?
The Roman numeral 'X' represents the value 10.
Click to reveal answer
beginner
How do you handle subtractive notation in Roman numerals (e.g., IV, IX)?
In subtractive notation, a smaller numeral before a larger numeral means you subtract the smaller from the larger (e.g., IV = 5 - 1 = 4).
Click to reveal answer
intermediate
What is the main approach to convert a Roman numeral string to an integer?
Traverse the string from left to right, add the value of each symbol, but if a smaller value precedes a larger one, subtract the smaller value instead of adding.
Click to reveal answer
beginner
Why do we subtract the value when a smaller Roman numeral comes before a larger one?
Because Roman numerals use subtractive notation to represent numbers like 4 (IV) or 9 (IX), where the smaller numeral before a larger one means subtraction.
Click to reveal answer
beginner
What data structure is commonly used to map Roman numerals to their integer values in code?
A dictionary (or map) is used to store Roman numeral characters as keys and their integer values as values for quick lookup.
Click to reveal answer
What integer does the Roman numeral 'IX' represent?
✗ Incorrect
'IX' means 10 - 1 = 9 using subtractive notation.
In the Roman numeral 'XIV', what operation is done when processing 'IV'?
✗ Incorrect
'IV' means 5 - 1 = 4 using subtractive notation.
Which data structure is best to store Roman numeral values for conversion?
✗ Incorrect
A dictionary allows quick lookup of Roman numeral values by their character keys.
When converting 'MCMXCIV', what is the integer result?
✗ Incorrect
M=1000, CM=900, XC=90, IV=4; sum is 1000+900+90+4=1994.
What should you do if a smaller Roman numeral appears after a larger one?
✗ Incorrect
If a smaller numeral comes after a larger one, you add its value.
Explain the step-by-step process to convert a Roman numeral string to an integer.
Think about how to handle subtractive notation while adding values.
You got /6 concepts.
Describe how subtractive notation works in Roman numerals and why it is important for conversion.
Focus on the position of smaller numerals relative to larger ones.
You got /4 concepts.