Browse thread
Set union
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-25 (22:31) |
From: | Radu Grigore <radugrigore@g...> |
Subject: | Re: [Caml-list] Complexity of Set.union |
On Fri, 25 Feb 2005 23:50:25 +0200, Radu Grigore <radugrigore@gmail.com> wrote: > The complexity of set_union is indeed O(n+N), see [0]. Ah, BTW, if you do something like set_union(..., inserter(s)); where s is a set then inserter has logarithmic complexity so overall you get O((n+N) lg(n+N)). -- regards, radu http://rgrig.blogspot.com/