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
What is a stack
A LIFO structure where the last item of data added is the first to leave
What is a pointer
a data item that identifies a particular elemnt in the data structure
What is recursion
the process of a subroutine calling itself
What are the three types of queues
- Linear Queue
- Circular Queue
- Priority Queue
What is a linear queue
A FIFO structure organised as a line of data such as a list
What is a circular queue
A FIFO data structure implemented as a ring where the front and rear pointers can wrap around the end to the start of the array
What is a priority queue
A variation of a FIFO structure where some data may leave out of sequence as it has a higher priority than other data items.
What is an undirected graph
A graph where the relationship between vertices is two way
What is a directed graph
A grapgh in which the relationship between the vertices is one way