Quick question...

I am writing a program to record entries with multiple data entries (4-5). I am just wondering which data structure would be best to store this in, a Linked list or a Binary search tree. which would be better?

Printable View

- 04-29-2004rhysmeisterLinked List or Binary Search Tree
Quick question...

I am writing a program to record entries with multiple data entries (4-5). I am just wondering which data structure would be best to store this in, a Linked list or a Binary search tree. which would be better? - 04-29-2004axon
Most likely linked list..... how many nodes? static or dynamic?

- 04-29-2004rhysmeister
The information grouping will consist of 4/5 data items and any number of individual records. Can you explain why a linked list would be better?

- 04-29-2004chrismiceliQuote:

*Originally posted by rhysmeister*

The information grouping will consist of 4/5 data items and any number of individual records. Can you explain why a linked list would be better?

- 04-29-2004rhysmeister
OK the information store should contain...

1. Title

2. Author

3. Reference code

4. Copy type.

There would be an an unlimited number of these. This is simply a program to index research papers. Thanks for your thoughts. - 04-29-2004UnregdRegd
I'd say the binary search tree because you can search through it more efficiently (O(log n) time compared to a linked list's O(n) time).

- 04-29-2004rhysmeister
Thanks for your thoughts!