Data Structures Flashcards
Arrays
A data structure consisting of a collection of elements (values or variables), each identified by at least one array index or key.
Stacks
A linear data structure which follows a particular order in which the operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out).
Queues
A linear structure which follows a particular order in which the operations are performed. The order is First In First Out (FIFO).
Linked Lists
A linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequence.
Trees
A nonlinear data structure. A tree can be empty with no nodes or a tree is a structure consisting of one node called the root and zero or one or more subtrees.
Graphs
A set of nodes that are connected to each other in the form of a network. Nodes are also called vertices. A pair(x,y) is called an edge, which indicates that vertex x is connected to vertex y.
Tries
A special data structure used to store strings that can be visualized like a graph. It consists of nodes and edges. Each node consists of at max 26 children and edges connect each parent node to its children. These 26 pointers are nothing but pointers for each of the 26 letters of the English alphabet A separate edge is maintained for every edge.
Hash Tables
A data structure which stores data in an associative manner. In a hash table, data is stored in an array format, where each data value has its own unique index value.