2. Fundamentals of Data Structures Flashcards
Describe an array.
Stores a finite, ordered set of data within a single identifier.
What is the difference between a field and a record?
A field is a single item of data, but a record is a structure that stores multiple fields, organised based on attributes.
What is a dictionary?
A data structure consisting of set of keys that are mapped to their corresponding values.
What is a dynamic structure?
A data structure which memory allocation size can change throughout the execution of the program.
What is a graph?
A data structure consisting of a set of vertices connected by a set of edges.
What is a hash table?
A structure where a hashing algorithm creates a mapping between the keys and the values. Data can be accessed by recalculation, not search.
What is a queue?
A FIFO data structure.
What is a stack?
A LIFO data structure.
What is a static structure?
A data structure which is allocated a fixed amount of memory space.
What is a tree?
A connected, undirected graph with no cycles.
What is a vector?
A data structure representing a quantity with both magnitude and direction.
How can vectors be represented?
A list, a function, a geometric point.
What are the operations of a stack?
Peek, pop, push
What are two ways of representing a graph?
Adjacency list, adjacency matrix
What are some categories of graphs?
(Un)weighted or (un)directed.