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
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?
Most likely linked list..... how many nodes? static or dynamic?
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?
Elaborate on what you are trying to store? A diagram or something more specific so we can help you.Quote:
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?
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.
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).
Thanks for your thoughts!