File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ extension Collection {
245
245
/// - Parameter kRange: The range of numbers of elements to include in each
246
246
/// combination.
247
247
///
248
- /// - Complexity: O(1)
248
+ /// - Complexity: O(1) for random-access base collections. O(*n*) where *n*
249
+ /// is the number of elements in the base collection, since `Combinations`
250
+ /// accesses the `count` of the base collection.
249
251
@inlinable
250
252
public func combinations< R: RangeExpression > (
251
253
ofCount kRange: R
@@ -279,7 +281,9 @@ extension Collection {
279
281
///
280
282
/// - Parameter k: The number of elements to include in each combination.
281
283
///
282
- /// - Complexity: O(1)
284
+ /// - Complexity: O(1) for random-access base collections. O(*n*) where *n*
285
+ /// is the number of elements in the base collection, since `Combinations`
286
+ /// accesses the `count` of the base collection.
283
287
@inlinable
284
288
public func combinations( ofCount k: Int ) -> Combinations < Self > {
285
289
assert ( k >= 0 , " Can't have combinations with a negative number of elements. " )
You can’t perform that action at this time.
0 commit comments