Integer To Roman

Please Note:

Another question which belongs to the category of questions which are intentionally stated vaguely.
Expectation is that you will ask for correct clarification or you will state your assumptions before you start coding.

Given an integer, convert it to a roman numeral, and return a string corresponding to its roman numeral version

Input is guaranteed to be within the range from 1 to 3999.

Example :

Input : 5
Return : "V"

Input : 14
Return : "XIV"

Note : This question has a lot of scope of clarification from the interviewer. Please take a moment to think of all the needed clarifications and see the expected response using “See Expected Output”

For the purpose of this question, has very detailed explanations.

Interview Code Editor
  • Solution Approach
  • Complete Solution
5947 successful submissions.
Asked In:
  • Amazon
  • Facebook
  • Microsoft
  • Twitter
Click here to jump start your coding interview preparation