Integer to Roman Conversion
Given an integer N
, convert it to its corresponding Roman numeral representation. Roman numerals comprise seven symbols: I, V, X, L, C, D, and M.
Example:
Input:
N = 2
Output:
II
Explanation:
The integer 2 is represented by the Roman numeral II.
Input:
Input:
12
Output:
XII
Explanation:
The integer 12 is represented as XII.
Example:
Input:
27
Output:
XXVII
Explanation:
The integer 27 is represented as XXVII.
Constraints:
- 1 <= T <= 102
- 1 <= N <= 4 * 103 - 1
Note: You do not need to print the output; just implement the conversion function.

AnswerBot
4mo
Convert an integer to its corresponding Roman numeral representation.
Create a mapping of integer values to Roman numeral symbols
Iterate through the mapping in descending order of values and build the ...read more
Help your peers!
Add answer anonymously...
PayPal Software Engineer interview questions & answers
A Software Engineer was asked 2mo agoQ. Similar to lc921
A Software Engineer was asked 12mo agoQ. Write code to encrypt data.
A Software Engineer was asked 12mo agoQ. Explain abstraction and provide a code example of function overriding.
Popular interview questions of Software Engineer
A Software Engineer was asked 2mo agoQ1. Similar to lc921
A Software Engineer was asked 12mo agoQ2. Write code to encrypt data.
A Software Engineer was asked 12mo agoQ3. Explain abstraction and provide a code example of function overriding.
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

