Fundamentals Of Data Structures Flashcards
What is a data structure
A common format for storing large volumes of related data which is an implementation of an abstract data type
What is an array
A set of related data items stored under a single identifier
What is a text file
a file that contains human-readable characters
What is a binary file
stores data as sequences of 0s and 1s
What is a record
one line of a text file
What is a field
an item of data
What is a queue
a data structure where the first item is added and first to be removed
What is stack
a data structure where the first item added is the first item removed
What is a static data structure
a method of storing data where the amount of data stored (and the amount of memory used to store it) is fixed
What is a dynamic data structure
a method of storing data where the amount of data stored and memory will vary as the program is being run
What is a heap
a pool of unused memory that can be allocated to a dynamic data structure
Advantages of Static Data Structure
- fast access to each element
- - structures are a fixed size so they’re more predictable
Disadvantage of Static Data Structure
– inneficient as memory is allocated that may not be needed
Advantages of a Dynamic Data Structure
- efficient as the amount of memory varies as needed
- - can use the heap if necessary
Disadvantages of a Static Data structure
- Slower access to each element as memory is allocated at run time
- memory addresses allocated may be fragmented so slower access