Roman Numerals Decoder
Last updated
Was this helpful?
Last updated
Was this helpful?
Roman Numerals Decoder
left-hand side value should subtract from right-hand side value when left value lower than right value
convert all roman number to decimal number and split as a array
check all of the array that LHS is greater than RHS
if LHS value lower than RHS add to restValue
and remove that value from array repeat from 2
summation filtered array values
subtract restValue from 4.
return the result