Re: Binary heaps
- From: "Michal Brzozowski" <rusolis@xxxxxxxxx>
- Date: 31 Aug 2005 06:53:22 -0700
Michal Brzozowski wrote:
> lauren wrote:
> > LOG-HEAP UNION is an operation defined as the union of a binary heap of
> > size N with a binary heap of size log N. Can a binary heap support
> > LOG-HEAP UNION, INSERT and EXTRACT-MIN each in O(log N) time? I'm
> > interested in knowing whether this is (i) impossible (ii) non-trivial,
> > but (maybe) possible (iii) straightforward
> >
> > Thanks,
> > Lauren
>
> If there existed an algorithm that could do LOG-HEAP UNION on two
> normal heaps (by normal I mean without any modifications) as you
> describe it, then it could join any two heaps in linear time to
> their size.
>
Sorry, I didn't prove anything. Joining 2 heaps in linear time
is trivial.
.
- References:
- Binary heaps
- From: lauren
- Re: Binary heaps
- From: Michal Brzozowski
- Binary heaps
- Prev by Date: Re: Binary heaps
- Previous by thread: Re: Binary heaps
- Index(es):
Relevant Pages
|