1
I am in need of a help to solve the following programming logic problem on Swift.
The task is to arrange the array below downwards using a function.
Description: You must implement an algorithm that receives a list of strings with a specific format and returns it in a descending order. Each string will be one month in which TAG delivered their boxes to the club members (ex: "January/2017", "March/2018", "April/2016"). The sort must be done in descending form (more recent to older) Its algorithm must be a function, written in Swift 4.x, whose call must be made as follows:
let mesesTag = [ "janeiro/2018", "novembro/2017", "fevereiro/2018", "março/2017", "julho/2016", "março/2018" ]
let mesesTagOrdenados = ordenar(mesesTag)
print(mesesTagOrdenados)
// resultado para este exemplo deve ser: // [ "março/2018", "fevereiro/2018", "janeiro/2018", "novembro/2017", "março/2017", "julho/2016" ]
Rodrigo, please add the code of your solution and explain what is not working. As described the question currently sounds like "Solve my programming task".
– Rafael Leão