A value less than or equal to the number of elements in the collection.
SDK
- Xcode 11.0+
Framework
- Swift Standard Library
Declaration
Discussion
Complexity: O(1) if the collection conforms to Random
; otherwise, O(n), where n is the length of the collection.