Interview Question: Integer to Roman Numeral


Coding interview question from

In this video, I show how to convert an integer into its roman numeral representation.

Do you have a big interview coming up with Google or Facebook? Do you want to ace your coding interviews once and for all? If so, Byte by Byte has everything that you need to go to get your dream job. We’ve helped thousands of students improve their interviewing and we can help you too.

Stuck on Dynamic Programming? Check out our free ebook:

50 Practice Questions:

You can also find me on



  1. Have you guys noticed how most people on leetcode use modulus to solve most of the problems, but as for me I always use brute force and my first attempts.

  2. the real question is how long did it take you to come up with this solution. And how long is the interview… and how long does it take to review Roman numerals, will they 'subtract points' if it takes you 15 mins to get your mind around Roman numerals in the context of this problem? I guess you have to jump through whatever hoops they put in front of you if you want the job, but whoever can solve this fresh out the box with no prep in a reasonable in-person interview time…. probably should be doing the hiring instead of trying to get hired.

  3. if you were to convert from Roman numeral to integer, how would you validate user input? I manage to make it work, but the codes weren't so elegant.

  4. I like the way you explain algorithms effortlessly. Can you please make a video explaining KMP algorithm? It will be awesome.

    And thanks for making these videos!

  5. great video..thanks for explaining things clearly..could you please post a video on the problem that has been mentioned in the link below? That would be of a great help. Thanks.


Please enter your comment!
Please enter your name here