1.4.2 Data Structures Flashcards
what is the difference between static and dynamic structures
static structures have a fixed length while dynamic structures have a changeable length
what is the difference between an array and a tuple(1)
Tuples are immutable (data cannot be changed), arrays can be modified(1)
what is a 2d array
a 2d array is an array that contains other arrays
what is a queue
a static first in first out structure for ordering data
what is an abstract data structure
a data structure made by the programmer
what is a list
an abstract data structure which stores a number of items
what is a linked list
an abstract dynamic data structure to ordered data from different locations
what is a stack
a last in first out data structure used to store instructions
what does the purpose of the call stack
to hold the active suboutines and their data
what is the difference between a list and a stack
a list is first in first out a stack is last in first out
what is the difference between a weighted and unweighted graph
with a weighted graph each edge has a value with an unweighted graph edges have no value
what is the difference between a directed and undirected graph
with a directed graph edges can only be traversed in one direction with an undirected graph they can be traversed in any direction
what is an adjacency matrix
a table to show the relationships in a graph
what is a tree
an abstract data structure used to represent structures making data easier to search
what is a Root Parent and Child
root: node with no incoming edges parent: a node with an outgoing edge child: a node with an incoming edge