Curate documentation for Algorithms module (#201)

This commit is contained in:
Nate Cook authored and GitHub committed 2023-08-24 14:17:38 -05:00
1 parent bfcaaa8758
commit fc8fdfd4dc
17 files changed
+377 -5

No files matched your search

+2 -2
View File
@@ -289,8 +289,8 @@ extension Collection {
/// - Parameter k: The number of elements to include in each combination.
///
/// - Complexity: O(1) for random-access base collections. O(*n*) where *n*
/// is the number of elements in the base collection, since
/// `CombinationsSequence` accesses the `count` of the base collection.
/// is the number of elements in the base collection, since
/// `CombinationsSequence` accesses the `count` of the base collection.
@inlinable
public func combinations(ofCount k: Int) -> CombinationsSequence<Self> {
precondition(k >= 0, "Can't have combinations with a negative number of elements.")