Company: Decendro_19_jan
Difficulty: medium
REST API: Country Codes Problem Description A country-information service exposes a collection of country records. Each record has a country name and a callingCodes array holding the country's international calling codes, in the order the service publishes them. A record may carry several calling codes, and a few records carry none at all. Instead of calling the service at run time, your program receives a snapshot of that collection on standard input , followed by the query. Implement getPhoneNumbers , which formats a phone number with the right country calling code: Look up the record whose name equals the queried country ignoring letter case . The match must be on the whole name - a name that merely starts with, or contains, the query does not count. If a record matches and it has at least one calling code, use the code at the highest index of its callingCodes array, and return the string +<Calling Code> <Phone Number> , for example +1 765355443 . Return "-1" if no recor