1.5 Data Structures Flashcards
What two categories do data structures fall into?
Static and Dynamic
What is a Static Data Structure?
It is a structure that holds data, and the size of the structure is set at the beginning of the program and cannot be changed
What is a Dynamic Data Structure?
It is a structure that holds data, and the size of the structure is not set at the beginning of the program and is flexible throughout.
What are the advantages and disadvantages of Static Data Structures?
Easy to program
You always know how much space they will take up
Inefficient, As you need to know how large your data is before storing it.
What are the advantages and disadvantages of Dynamic Data Structures?
Do not have a limited size
Tend to be more complex than Static data structures to implement
Array
An array is a data structure, It is a collection of variables of the same data type grouped under a single identifier
Are arrays static or dynamic data structures?
Usually Static
Record
A record is a set of data items all related to a single entity, It can contain data items of more than one data type