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

| Given an n x m grid, where rows are numbered from 7 to n and columns from 1 to … |
| There are 'N' coders standing in a line, where i denotes the ith position of a … |
| A birthday party was attended by N number of kids, and each kid was given a uni… |
| Given a matrix of size m * n, where m denotes the number of rows (starting with… |
| A traveler is traveling from the city of Zeta to Omega. He starts with X amount… |
| As an operations engineer at Amazon, you are responsible for organizing the dis… |