Convert Integer to Roman numeral - LeetCode Interview Coding Challenge [Java Brains]

preview_player
Показать описание
Interview Question: Convert Integer to Roman numeral

Difficulty level: Easy
Language: Java

Welcome to the Java Brains Java Interview challenge series of videos where we tackle various coding challenges ranging from the beginner level to advanced level - especially in the context of coding interviews.

Any coding problems you would like me to explore? Please let me know in the comments what you think!

#java #interview #javabrains
Рекомендации по теме
Комментарии
Автор

As you have said in the end, sometimes we complicate fairly simple tasks. I was thinking about using switch case, hashmap and whatnot before I saw your approach to the question. Amazing explanation.

rutvij
Автор

After so many days, I recollected my childhood days, where I use to play with Roman numbers, but completely forget when days have grown. Now it's because of u, I recollected them and felt enjoying by looking at your video. Thank you so much sir.

suseelkumarannamraju
Автор

Thanks for sharing this gem. If I had not gone through this video I would have chosen a much complex approach to solve this. This solution teaches that for some 'COMPLEX-SOUNDING' problems. A simple and feasible solution exists. All we need is to stick to the basics...
Thanks again for this wonderful tutorial Kaushik..God bless you.

abhinav
Автор

This is such a great video, I remember the first time I encountered it in school. I went a different more convoluted route.

geovanny_alfaro
Автор

Yeeee! I love you Man! Thanks a ton for every contribution you made in my career!

ADGroupOfArtMedia
Автор

wow! what a nice thinking process. many YouTubers share logic, but to my surprise, you speak about the thought process. Thank you so much sir. can you please make leetcode playlist for all the medium level problems

sureshgarine
Автор

One of the best optimised solution for int to roman conversion. your just awesome man

kirant
Автор

Wow. I did not know you started sharing leetcode questions. This is awesome. Is there a playlist?

vinayprasad
Автор

Please do more of these type of problems. Your explanation is very good and clear. Expecting more like this

preethialbert
Автор

Saiman says teaching java, amazing...

tanaypatel
Автор

Amazing! my Primary-2 kid actually have this Math topic of ones, tens, and hundreds.. This is an amazing solution. Thanks so much sensei Kaushik. :)

monsterhuntergo
Автор

super one Kaushik. the approach you take to these problems is very intuitive . Thanks for this video.

madhug
Автор

thumbs up :), and sorry for prev comment on last video

shrad
Автор

Interesting. I tought we would need to do the parse at one point. This is an excellent solution.

aleksapetrovic
Автор

@Java Brains - Super Awesome..!! I like the "what kind of questions you can ask from Interviewer" part of your video, this usually youtuber don't tell it. Please go ahead with Leetcode series.

shuchivarshney
Автор

Your videos keep getting better and better. Kudos!

cdhagen
Автор

wow...my solution
thank you for this lol

bhaminisundararaman
Автор

Thank you so much for making the question so easy to understand

nerodant
Автор

And here I was so proud of my code:
"int unit = value % 10;
value /= 10;
int dozen = value % 10;
value /= 10;
int cent = value %10;
value /= 10;
int mil = value %10;
value /= 10;

return

Lot of repeated stuff honest work, then I saw the video sooo much to learn =/

FBHI
Автор

This will work up to 3000. You can make it work easy up to 10000 or to max_value from short (just don't pass int as argument as this can go from -2147483647 to +2147483647to . What Romans did was to add a line over a number meaning they were multiplying that number by 1000. So, if you needed to write 9000 you had IX with a line over it. So for a max short (32768) you would have the tens of thousands XXX with a line over it and then use your function to append to it.

OzWannabe