0

How to solve this problem

Walder Frey was introducing his daughters to Edmure Tully. Lord of Riverrun during the Red Wedding. There are N daughters that he wanted to introduce: Daughter 1, Daughter 2.... Daughter N. Daughter i lives in city Si, and Walder is giving a number (Pi) to each of his Daughter out of 100. No two Daughters have the same number. Walder Frey wants to introduce his daughters in the following order: The daughters are standing in lexicographical order of the names of their cities in which they live. If there are multiple daughters in the same city, they are arranged in descending order of the number given to them by Walder. Print the identification numbers of the daughters in the order they are introduced by the Walder to Edmure Tully

25th Feb 2023, 6:39 AM
Bobbili Hrishitha
Bobbili Hrishitha - avatar
1 Answer
+ 5
An input and output example could help to understand some further details. And a link to your code on SL playground will be helpful.
25th Feb 2023, 9:46 AM
JaScript
JaScript - avatar