DOCUSIGN Coding Question – Solved

3 Live
Roman Numerals You are given an array of integers. Your task is to convert each integer into its Roman numeral equivalent. The following table contains some reference values for converting between Arabic (standard integers) and Roman numerals: Arabic - Roman 1 - I 4 - IV 5 - V 9 - IX 10 - X 40 - XL 50 - L 90 - XC 100 - C 400 - CD 500 - D 900 - CM 1000 - M Example Input: numbers = [1, 49, 23] Output: ["I", "XLIX", "XXIII"] Explanation: 1 is "I" 49 is 40 + 9 β†’ "XL" + "IX" = "XLIX" 23 is 10 + 10 + 3 β†’ "X" + "X" + "III" = "XXIII" Function Description Complete the function romanizer in the editor below. romanizer has the following parameters: int numbers[n]: an array of integers Returns string[n]: an array of strings that represent the integers as their Roman numeral equivalents. Constraints 1 ≀ n ≀ 1000 1 ≀ numbers[i] ≀ 1000

Asked in: DOCUSIGN

Image of the Question

Question Image Question Image

All Testcases Passed βœ”



Passcode Image

Solution


Please login to view the solution


Related Questions

| You are given a board of size M Γ— N where each cell can be either empty ('O') o… |
| Undirected Coloured Graph Shortest Path You are given an undirected weight… |
| Village Voyage A computer game "Village Voyage" has N villages (labeled 1 to… |
| Academic Decathlon Students are being selected for an academic decathlon tea… |
| Sum of Arrays Given two arrays each of length n, arr1 and arr2, in one opera… |
| Count Swaps During Custom Sorting Analyze the efficiency of the following so… |