1/15
data structures
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
what is an array?
a variable that contains more than one data item/ static/ only one data type
What is a record?
a collection of different fields which can be of different data types
What is a list?
a data structure that consists of a number of items where the items can occur more than once
What is a tuple?
an ordered set of values of any type
What is a linked list?
a data structure that provides a foundation upon which other structures can be built, like stacks, graphs, queues and trees
What is a dictionary?
an abstract data type made up of associated pairs
What is a hash table?
an associative array which is coupled with a hash function
What is a stack?
a linear data structure that follows LIFO principle
What is a queue?
a linear data structure/ enqueue + dequeue / items removed from top of queue
What is a graph?
a set of nodes that are connected by edges
ADV of matrix considerations in graphs
convenient to work with
adding an edge is simple
DIS of matrix considerations in graphs
a sparse graph (not many connections) will leave most cells empty and this is not storage efficient
What is a tree?
A connected undirected form of a graph with nodes and pointers
An abstract data type
how is a directed graph different to an undirected graph?
in directed graphs, edges can only go in one direction
in undirected graphs edges can go in both directions
ADV + DIS of declaring an array as a global variable?
ADV = can be accessed anywhere in the program
DIS = increases memory usage as it is used until full program execution is over