Problem 13: Roman to Integer

https://leetcode.com/problems/roman-to-integer/

思路

  • 用 HashMap 提前把这些字母都存好,为以后使用提供方便

易错点

  1. 从最后一位开始记起, 循环的时候从倒数第二位往前面走。

Last updated

Was this helpful?