Skip to content

Commit 946e75a

Browse files
committed
Add complexity annotations
1 parent e24bfd1 commit 946e75a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Data/HashMap/Internal.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2316,7 +2316,8 @@ searchSwap mary n toFind start = go start toFind start
23162316
else go i0 k (i + 1)
23172317
{-# INLINE searchSwap #-}
23182318

2319-
-- | Check whether the key sets of two maps are disjoint (i.e., their 'intersection' is empty).
2319+
-- | \(O(n \log m)\) Check whether the key sets of two maps are disjoint
2320+
-- (i.e., their 'intersection' is empty).
23202321
--
23212322
-- @
23222323
-- xs ``disjoint`` ys = null (xs ``intersection`` ys)

Data/HashSet/Internal.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ intersection :: Eq a => HashSet a -> HashSet a -> HashSet a
405405
intersection (HashSet a) (HashSet b) = HashSet (H.intersection a b)
406406
{-# INLINABLE intersection #-}
407407

408-
-- | Check whether two sets are disjoint (i.e., their intersection is empty).
408+
-- | \(O(n \log m)\) Check whether two sets are disjoint (i.e., their
409+
-- intersection is empty).
409410
--
410411
-- @
411412
-- xs ``disjoint`` ys = null (xs ``intersection`` ys)

0 commit comments

Comments
 (0)