static and dynamic : stacks and queues Flashcards
1
Q
what are the properties of static data structures
A
- Max size needs to be know in advance
- Memory cannot be relocated once program is running
- Arrays are static
2
Q
what are the properties of dynamic data structures
A
- Allows the programmer to control the memory used
- Unused memory is allocated and de allocated as it is needed
- Linked lists are dynamic
3
Q
what is a positive of dynamic
A
it is more efficient
4
Q
what is a negative of dynamic
A
risk over or underflow
5
Q
what is a positive of static
A
its easier to code
6
Q
what type of data strucutres are stacks
A
Stacks are a last in first out data structure
7
Q
what type of data strucutres are queues
A
Queue are first in first out data structure