Ariel Scolnicov wrote:
 
> This only works for complete binary trees, of course.  You cannot
> e.g. represent this tree (without wasting an exponential amount of
> space, that it):
> 
>                          /\
>                         /\
>                        /\
>                       /\
>                      /\
>                     /\
>                    /\
>                   /\
> 
> So it's mostly used for very specific trees.  There's a standard way
> to build a heap which works this way.


Hashes also waste a lot of space.  Something balanced might use less
space than a hash.  Depends on the data, of course.





-- 
                                           David Nicol 816.235.1187
Refuse to take new work - finish existing work - shut down.

Reply via email to