Dynamic Data Structure -- Which one is better? Linked list or tree?
I think your answer would be "it depends". However, which one is beeter in what situation? Is there any other better Dynamic Data Structure?
Actually adding element to a ordered link list is slower that adding to a tree, but for a tree, when I want to dump the data to the screen, the result must be ordered. How can I make a tree which has high efficiency when I try to add "data" to searched element (thats tree's usual advantage) PLUS when I want to dump the element to the screen, the dumping order is the sequence I have entered the element RATHER then the ordered sequence(that's not usual for tree) ?
You may say if you wan to cout them according to the order of element entrance, you would better use linked-list. But searching in a linked-list to add data to matched element is slower. How can I combine the two advantages?