Unit 7 Data Structures Flashcards
What are the properties of a Tuple? (3)
- It is an ordered set of values
- It may have elements of mixed types
- It is immutable
What does Immutable mean?
Elements cannot change
What is a Dynamic Data Structure?
It can change size when required
What is a Static Data Structure?
It cannot change size
What are Integer, Real, Boolean and Char all examples of?
Elementary data types
What are String and Array both examples of?
Composite data types
What are List, Stack and Queue all examples of?
Abstract data types
What is an ADT?
Abstract Data Type
A logical description of how we view the data and possible operations
What does the Queue Function enQueue(item) do?
Adds an item to the rear
What does the Queue Function deQueue do?
Removes and returns an item from the front
What does the Queue Function isEmpty do?
Indicates if a queue is empty
What does the Queue Function isFull do?
Indicates if a queue is full
What happens in a Priority Queue?
Some items are allowed to ‘jump’ the queue
What is Overflow?
Attempting to push onto a stack that is full
What is Underflow?
Attempting to pop from a stack that is empty