Next topic |
Ada Home Page |
Index
Dynamic data structures
Motivation
How to store:
- queue of items?
- family tree?
Possibilities?
- array: space may be too much, or not enough
- direct access file: slow
Needed:
- variable size: dynamic data structures
- pointers: access variables
Static vs. Dynamic
Static = fixed size
- array
- space allocated by compiler
- space wasted or insufficent
Dynamic = variable size
- size starts at zero, changes as necessary
- space allocated by programmer
- access variables needed
Next topic |
Ada Home Page |
Index
c-lokan@adfa.oz.au / 26 Feb 96