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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you use records?

A
  1. Define the record structure: what fields will be in the record
  2. Declare a variable or array to use with the record structure
  3. Assign and retrieve data from the variable record
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a tuple?

A

A tuple is a list which is immutable (can’t be changed once created), they are static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a list?

A

A list is mutable (can be changed once created)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a static data structure?

A

Size of the structure cannot change at run time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a Dynamic data structure?

A

Size of the structure can change at run time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does Immutable mean?

A

Structure and data cannot be changed at run time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does Mutable mean?

A

Structure and data can be changed at run time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly