What is meant by a static data structure?
Structure size cannot change at runtime
What is meant by a dynamic data structure?
Structure size can change at runtime
What is meant by an immutable data structure?
Structure/data cannot be changed at runtime
What is meant by a mutable data structure?
Structure/data can be changed at runtime
What is a record?
A collection of related fields. A field is a variable, and each field in a record can have a different data type
What is meant by continguous?
All the data is stored together, one element after the other
Are arrays contiguous?
yes
Are lists contiguous?
no
What are the features of an array? (5)
What are the features of a list? (5)
What are the features of a tuple? (5)
What is a stack?
What is meant by a LIFO structure?
- The last item to be pushed onto the stack must also be the first item to be popped off
What is the purpose of a stack pointer?
Always point to the node at the top
What is a stack overflow?
Any attempt to push an item onto a full stack
What is a stack underflow?
Any attempt to pop an item off an empty stack
How is a stack implemented?
- object oriented techniques
What are stacks used for?
- Backtracking algorithms - e.g. pathfinding maze solutions
What operations can be performed on a stack?
What is a queue?
what is a FIFO structure?
- First item in the queue is the first item to be dequeued
What is the purpose of the back pointer of a queue?
Always points to the last item
What is the purpose of the front pointer of a queue?
Always points to the first item
What is a queue overflow?
An attempt to enqueue an item in a full queue