Company: Greyorange
Difficulty: medium
10. Ancestral Names Given a list of strings comprised of a name and a Roman numeral, sort the list first by name, then by the decimal value of the Roman numeral. In Roman numerals, a value is not repeated more than three times. At that point, a smaller value precedes a larger value to indicate subtraction. For example, the letter I represents the number 1 , and V represents 5 . Reason through the formation of 1 to 10 below, and see how it is applied in the following lines. I, II, III, IV, V, VI, VII, VIII, IX, and X represent 1 through 10 . XX, XXX, XL, and L are 20, 30, 40, and 50 . For any other two-digit number 43 is 40 + 3 = \'XL\' + \'III\' = \'XLIII\' Function Description Complete the function sortRoman in the editor below. sortRoman has the following parameters: names[n] : an array of strings comprised of names and roman numerals Returns: string[n] : an array of strings sorted first by given name, then by ordinal Constraints 1 ≤ n ≤ 50 Each names[i] is a single string composed o