Leetcode-013-罗马数字转整数
摘要:
双指针问题,当前的数小于后一位,就减去它的值,否则就加上它的值。 class Solution { public int romanToInt(String s) { Map<Character, Integer> demo = new HashMap<>(); demo.put('I', 1); 阅读全文
posted @ 2020-03-04 23:54 Weikoi 阅读(107) 评论(0) 推荐(0)
浙公网安备 33010602011771号