Slide 10
Slide 10 text
స
package mai
n
import "fmt
"
func main()
{
stations := []string{"וా", "ޱ", "ଂ৽ా", "Լؙࢠ", "ӏͷ", "প෦", "ଟຎ"
}
for i, j := 0, len(stations)-1; i < j; i, j = i+1, j-1
{
stations[i], stations[j] = stations[j], stations[i
]
}
fmt.Println(stations) // [ଟຎ প෦ ӏͷ...
]
}
reverse() ͱ͔ͳ͍ͷͰɺ۪ʹ for Λճ͢