Discussion 解説
The following example reverses the elements of an array of characters: 以下の例は、文字列からなる配列の要素を逆順にします:
var characters: [Character] = ["C", "a", "f", "é"]
characters.reverse()
print(characters)
// Prints "["é", "f", "a", "C"]
Complexity: O(n), where n is the number of elements in the collection. 計算量:O(n)、ここでnはコレクションの中の要素数です。