Reverses the elements of the collection in place.
SDK
- Xcode 9.3+
Framework
- Swift Standard Library
Declaration
Discussion
The following example reverses the elements of an array of characters:
Complexity: O(n), where n is the number of elements in the collection.