Closed kermit10000000 closed 6 years ago
Requirement: method like:
std::string getTheClosestCityThatIsBiggerThanMe
(const std::vector<City>& vec, std::string cityName);
i.e.:
getTheClosestCityThatIsBiggerThanMe(vec, "Zgierz");
is to return "Lodz"
getTheClosestCityThatIsBiggerThanMe(vec, "Lodz");
is to return "Warszawa"
getTheClosestCityThatIsBiggerThanMe(vec, "Warszawa");
is to return ""
(empty string), because it is the biggest City in vector.By biggest
I mean the population NOT Area!
Please, think also about method
std::string getAllBiggestCitiesInOrder
(const std::vector<City>& vec, std::string cityName);
i.e.:
getAllBiggestCitiesInOrder(vec, "Zgierz");
is to return "Lodz Warszawa"
getAllBiggestCitiesInOrder(vec, "Lodz");
is to return "Warszawa"
getAllBiggestCitiesInOrder(vec, "Warszawa");
is to return ""
(empty string), because it is the biggest City in vector.
Descrpition
Code to determin which closest city next to the determined city is the biggest so we sort the cities by distance and then choose the first one bigger than the city. Then we repeat this step until there is no bigger city left.
Release affected
Yes. It is part of the 0.3.0 release
Priority
HIGH - because it must be done before 0.3.0
Is there possible contributor who could fix the issue
Wojciech Mielczarek