Fundamentals of Data Structure Flashcards
Abstract Data Type
A conceptual model of how the data is stored and the operations that were performed upon them.
Static Data Structure
A method of storing data where the amount of data stored (and memory used to store it) is fixed.
Dynamic Data Structure
A method of storing data where the amount of data stored (and memory used to store it) will vary as the program is being run.
Stack
A stack is an example of LIFO
A stack in a computer works exactly as a stack of books waiting to be marked - whichever item was added to the top is the first to be dealt with. However, data dealt with is NOT removed from the stack. What happens is that a variable called the stack pointer keeps track of where the top of the stack is.
Data is ‘pushed’ onto the stack or is ‘popped’ from the stack.
Stack Frame
A collection of data about a subroutine call
Call Stack
A special type of stack used to store information about active subroutines and functions within a program
Recursion
The process of a subroutine calling itself
Stack Pointer
A small register that stores the address of the last program request in a stack.
Queue
A queue is an example of FIFO
FIFO - First in First out (where the first data item is first to leave)
A common use for queues is when sending a document to the printer.
Linear Queue
http://image.ibb.co/dgKP0y/20180603_155036.jpg
Circular Queue
http://image.ibb.co/kO8j0y/20180603_155042.jpg
A common implementation for Circular Queue is for buffering, when items of data need to be stored temporarily while they are waiting to be passed to/from the device.
Priority Queues
A variation of a FIFO structure where some data may leave out of sequence where it has a higher priority than other data items.
Example: If documents are being sent to a printer on a network, the administrator may be able to control the queue.
Graph
A mathematical structure that models the relationship between pairs of objects.
A tree is similar to a graph, but with no loops.
Arc/Edge
Join/show relationship between 2 nodes
Vertex/Vertices
An object in a graph - also known as a node