[plt-scheme] Tree structure in Scheme

From: Paulo J. Matos (pocmatos at gmail.com)
Date: Wed May 10 12:03:41 EDT 2006

On 10/05/06, Ivanyi Peter <pivanyi at freemail.hu> wrote:
> Hi,
>
> If I want to implement a tree-type hierarchy, what is the
> suggested
> data structure? I would like to know who the parent is who the
> children are, so walking up and down, and I also would like
> to access
> to the leaves directly, not always through the root.
>
> I am looking for suggestions or a documentation or a
> discussion about it.

Not sure if this is the best way but a straightforward  solution would
be to use the usual list structure for the tree and hashing leaves.
Obviously you have to define inserts and removes so that each time you
do that you keep the hash in sync with the list.

Cheers,

Paulo Matos

> Thanks,
>
> Peter Ivanyi
>
>
>
>
> _______________________________________________________________________________
> Most kényelmesebben és gyorsabban kaphat útbaigazítást a T-Online Térkép és Útvonaltervező segítségével!
> http://terkep.t-online.hu
>
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group

Posted on the users mailing list.