Fundamentals of data structures Flashcards
Data structures
A data structure is a format used to store, organise and manage data in a way that allows efficient access and modification for the needs of the program.
Arrays
A data structure for storing a finite, ordered set of data of the same data type within a single identifier.
Multi-dimensional arrays
An array where each data item is located using multiple indices.
Single-dimensional arrays
An array where each data item can be located using a single index.
Binary file
An organised collection of records where data is stored in binary.
Fields
A single item of data.
Records
A data structure that stores multiple fields, organised based on attributes, within a single line of a file.
Text file
An organised collection of records where data is stored in human-readable characters.
Dictionaries
A data structure consisting of a set of keys that are mapped to their corresponding values.
Dynamic structures
A data structure whose memory allocation size can change throughout the execution of the program.
Graphs
A data structure consisting of a set of vertices/nodes connected by a set of edges/arcs.
Hash tables
A data structure where a hashing algorithm creates a mapping between keys and values. The data item can then be directly accessed by recalculation, without any search.
Queues
A first-in-first-out (FIFO) dat structure. The first item added/pushed on to the queue is the first to be removed/popped off.
Stacks
A last-in-first-out (LIFO) data structure. The last item added/pushed is the first to be removed/popped off.
Static structures
A data structure that is allocated a fixed amount of memory space, which does not change throughout the execution of the program.
Trees
A data structure that uses a set of linked nodes to form a hierarchical structure starting at the root node. Each node is a child/sub-node of a parent node.
Data structures
A data structure is a format used to store, organise and manage data in a way that allows efficient access and modification for the needs of the program.
Arrays
A data structure for storing a finite, ordered set of data of the same data type within a single identifier.
Multi-dimensional arrays
An array where each data item is located using multiple indices.
Single-dimensional arrays
An array where each data item can be located using a single index.
Binary file
An organised collection of records where data is stored in binary.