POV-Ray : Newsgroups : povray.off-topic : 10 things to use a Min Heap for : Re: 10 things to use a Min Heap for Server Time
7 Sep 2024 19:12:52 EDT (-0400)
  Re: 10 things to use a Min Heap for  
From: Darren New
Date: 19 Jun 2008 16:43:44
Message: <485ac500$1@news.povray.org>
Warp wrote:
> only get the minimum but *also* the maximum element in O(1) time. 

This needs a pointer from the root directly to the smallest leaf and 
largest leaf, doesn't it?  Not to dispute; I'm just trying to understand 
how it's a constant-time operation. O(lg N) is easy to understand.

And by "three pointers" you're including a pointer to the parent, yes? 
What's the flag? the red/black flag?

-- 
Darren New / San Diego, CA, USA (PST)
  Helpful housekeeping hints:
   Check your feather pillows for holes
    before putting them in the washing machine.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.