

19·
5 days agoSince Roman numerals have an upper bound, the time complexity is always O(1).
Since Roman numerals have an upper bound, the time complexity is always O(1).
It’s besically android without the Google parts.
I just bought the Fairphone 6 with /e/os. I am pleasantly surprised with how many apps work just fine.
I’m not too good with java, but it should be something like this:
public static int convertRomanNumeral(string n){Map.of("M","DD","CD","CCCC","D","CCCCC","C","LL","XL","XXXX","L","XXXXX","X","VV","IV","IIII","V","IIIII");.forEach((k,v)->{n=n.replace(k,v);});return n.length();}