Update RomanToInteger.java

In case if lower case roman letters are supplied, we need to convert into single case(Upper case).
This commit is contained in:
Pa1sathvik 2020-08-10 19:15:34 +05:30 committed by GitHub
parent 5fd352f84e
commit eb75ce5096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ public class RomanToInteger {
*/
public static int romanToInt(String A) {
A = A.toUpperCase();
char prev = ' ';
int sum = 0;