We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
permutations(ofCount:)
1 parent 9872ec2 commit c54cf53Copy full SHA for c54cf53
Sources/Algorithms/Permutations.swift
@@ -301,7 +301,9 @@ extension Collection {
301
/// If `k` is `nil`, the resulting sequence represents permutations of this
302
/// entire collection.
303
///
304
- /// - Complexity: O(1)
+ /// - Complexity: O(1) for random-access base collections. O(*n*) where *n*
305
+ /// is the number of elements in the base collection, since `Permutations`
306
+ /// accesses the `count` of the base collection.
307
@inlinable
308
public func permutations(ofCount k: Int? = nil) -> Permutations<Self> {
309
assert(
0 commit comments