Hey ppl, I'm trying to store the structure of a tree. Any ideas on the best way of achieving this?
Anonymous
Ranch Hand
Joined: Nov 22, 2008
Posts: 18944
posted
0
Why not simply serialize the entire tree to a file? (starting from the root node) kind regards
Ellen Zhao
Ranch Hand
Joined: Sep 17, 2002
Posts: 581
posted
0
Hi Steward, I would choose LinkedList or Vector to implement a tree data structure, generally speaking, both of them work fairly well for binary tree/binary search tree/AVL tree/fibonacci tree/b tree/b* tree(use double LinkedList here)/suffix tree/game tree etc. I don�t quite understand the "store" you mentioned here. Because usually when the tree is being generated, both its innern notes and leaves are stored in the LinkedListed or Vector. Could you please offer some further specification? I guess you wanted to visit all the notes in the tree ?
Regards, Ellen [ January 31, 2003: Message edited by: Ellen Fu ]