Implement the roman numeral to integer problem in leetcode.