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

Popular posts from this blog

Maximum Gap

[ITint5] Maximum Subarray for a Circular Array

[CC150] Chapter 4 Trees and Graphs