Roman to Integer
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
Solution: Here I use hash table for fun... it might be inefficient since the table is so small.
It is easy to replace hash table to a helper function.
Redo it (Sep. 6, 2013), Bug Free!
Comments
Post a Comment