LeetCode 13 | Roman to Integer | Solution Explained (Java)

preview_player
Показать описание
In this problem we are given a Roman Integer String and asked to convert an integer.

Running Time: O(1)
Space Complexity: O(1)

FOLLOW ME:
Рекомендации по теме
Комментарии
Автор

I've seen many ways of doing this problem and I've to say yours is the best fit to the specifications of the problem statement, thank you!

KCTsangKen
Автор

Thank you. I followed your logic behind this so easily.

DriveBreakFixRepeat
Автор

Thanks Xavier for such well-explained video.

ismoilova_shahina
Автор

is it possible to do this without hashmaps? just curious!

jayhun
Автор

Thank you Xavier! I would say that the time complexity is not constant, but linear.
Time Complexity: O(N) where N is the length of S.

Also, I'm not sure that a loud music (Eminem?) on background is a good idea.

sergeychepurnov
Автор

I can not understand what you say as a non-native speaker.

menoktaokan