2023-03-23 13:53:46 +01:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
func reverse(elements []string) []string {
|
2023-04-03 10:03:52 +02:00
|
|
|
for i := 0; i < len(elements)/2; i++ {
|
|
|
|
j := len(elements) - i - 1
|
|
|
|
elements[i], elements[j] = elements[j], elements[i]
|
|
|
|
}
|
|
|
|
return elements
|
2023-03-23 13:53:46 +01:00
|
|
|
}
|