Given an integer n, your task is to complete the function convertToRoman which prints the corresponding roman number of n. Various symbols and their values are given below.
n = 5
n = 3
Complete the function convertToRoman() which takes an integer N as input parameter and returns the equivalent roman.
Expected Time Complexity: O(log10N)
Expected Auxiliary Space: O(log10N * 10)
We strongly recommend solving this problem on your own before viewing its editorial. Do you still
want to view the editorial?
Login to access your submissions.