Re: [algogeeks] Re: Saving and restoring Binary trees in files

2013-11-13 Thread atul anand
@Don : +1 ..got it ..thanks On Wed, Nov 13, 2013 at 10:35 PM, Dave wrote: > @Don: Excellent solution. It requires little extra data to be stored, and > it is easy to implement. > > Dave > > On Wednesday, November 13, 2013 9:31:47 AM UTC-6, Don wrote: > >> The data file contains the pre-order tr

Re: [algogeeks] Re: Saving and restoring Binary trees in files

2013-11-13 Thread Dave
@Don: Excellent solution. It requires little extra data to be stored, and it is easy to implement. Dave On Wednesday, November 13, 2013 9:31:47 AM UTC-6, Don wrote: > The data file contains the pre-order traversal. For each node indicate the > contents of the node and two bits to indicate if

Re: [algogeeks] Re: Saving and restoring Binary trees in files

2013-11-13 Thread Don
The data file contains the pre-order traversal. For each node indicate the contents of the node and two bits to indicate if it has a left and/or right subtree. I did this with a tree containing strings. Each node was one line in the file, with the first character being 'A' if the node is a leaf,