Min Li's Note
KVM,QEMU, X86 virtualization
Pages
Home
Collection
About
Thursday, October 2, 2014
Roman to Integer
Problem
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
Idea
一定要注意好radix和symbol两个数组的顺序,依次遍历s,把找到的子串删掉,然后继续,并更新result.
Solution
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment