A set of data items together with fundamental operations for
manipulating these items.
Examples: Lists, Stacks, Queues, Trees, even simple Arrays,
etc.
Choice of data structure can affect
whether a program runs in a few seconds or requires days
Questions to ask when choosing a data structure:
1. are data items inserted at beginning or are insertions
randomly done with other operations?
2. can data items be deleted?
3. are data items processed in order or randomly?
4. do you know anything about the nature and frequency of the data
5. is a data item related to other data items in any way
|