[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: saving binary tree to file



Hi

U can use a Level Order Traversal and strore the tree on a file with
Markers. To reconstruct the tree from the file becomes simple - jus add
children to root recursively..


vinod...


On Wed, 29 Nov 2000, sreangsu acharyya wrote:

> 
> Hello,
>   I need to save a binary tree (of lists) in a file. I think saving them
> in pre-order sequence should enable one to recreate it from the disk
> again. But what i want to know is, is it possible to use the db package to
> do the same or is there any other lazy way of doing it.
>  
>   I read up the man pages of db but couldnt answer the question myself
> 
> sreangsu
> 
> 
> ---------------------------------------------
> An alpha version of a web based tool to manage
> your subscription with this mailing list is at
> http://lists.linux-india.org/cgi-bin/mj_wwwusr
> 

--