Data Structures Flashcards
1
Q
What are the four key points for Arrays?
A
- An array allows you to store multiple items of the same data type under one common name
- Zero based, first element is always index 0
- They must store the same data type
- They are static data structures; they cannot change in size once they have been declared
2
Q
What are the three key points for records?
A
- A record is a collection of related fields
- A field is a variable
- Each field in a record can have a different data types
3
Q
How do you use records?
A
- Define the record structure: what fields will be in the record
- Declare a variable or array to use with the record structure
- Assign and retrieve data from the variable record
4
Q
What is a tuple?
A
A tuple is a list which is immutable (can’t be changed once created), they are static
5
Q
What is a list?
A
A list is mutable (can be changed once created)
6
Q
What is a static data structure?
A
Size of the structure cannot change at run time
7
Q
What is a Dynamic data structure?
A
Size of the structure can change at run time
8
Q
What does Immutable mean?
A
Structure and data cannot be changed at run time
9
Q
What does Mutable mean?
A
Structure and data can be changed at run time