LeetCode 12 | Integer to Roman (Java)

preview_player
Показать описание
This is a continuation of Roman to Integer on LeetCode
Description: "Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999."
Running Time: O(1)
Space Complexity: O(1)

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

Let me know if you guy have any questions or feedback.

xavierelon
Автор

Thanks for your help, your editing is getting better as well

ryanoliver
Автор

There is a reason why stringbuilder is fast. Doing operation on stringbuilder edits the same string while as if it was just string an another copy is actually created. Basically when ever we have to edit our string multiple times stringbuilder should be used becuase it is mutable unlike String which is immutable and creates another copy in the memory while we think it is being edited. Thanks for the logic behind the problem. I was stuck on this one for a long time.

kaisarshabir
Автор

Can you give me a discord server link that helps us to meet mentor and talk to him in vc and sharing doubt and discuss problem solving.i hope you will help me.

justworkfine
Автор

Can you talk about how you think of the solution to the problem?Just the way to come up ?

yunlongguo
Автор

Another great vid, wouldn't it make more sense space-wise to use a hashmap instead of two lists for converting integer values to roman values?
1: "I",
5: "V",
10: "X",
50: "L",
100: "C",
500: "D",
1000: "M",
4: "IV",
9: "IX",
40: "XL",
90:"XC",
400: "CD",
900: "CM"

sasgaro