Data Structures Flashcards
What is a abstract data type / ADT?
An abstract data type (ADT) is a data type described by predefined user operations, such as “insert data at rear,” without indicating how each operation is implemented.
What is a data structure?
A data structure is a way of organizing, storing, and performing operations on data.
What is the main difference between an ADT and a data structure?
ADTs: Abstract definitions focusing on what operations are supported and their properties.
Data Structures: Concrete implementations that provide a way to physically organize data in memory.
What is a Record (Struct)?
A record is the data structure that stores subitems, often called fields, with a name associated with each subitem.
What is an Array?
An array is a data structure that stores an ordered list of items, where each item is directly accessible by a positional index.
What is a linked list?
A linked list is a data structure that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node.
What is a Binary tree?
A binary tree is a data structure in which each node stores data and has up to two children, known as a left child and a right child.
What is a Hash table?
A hash table is a data structure that stores unordered items by mapping (or hashing) each item to a location in an array.
What is a Heap?
A (data structure) max-heap is a tree that maintains the simple property that a node’s key is greater than or equal to the node’s childrens’ keys. A min-heap is a tree that maintains the simple property that a node’s key is less than or equal to the node’s childrens’ keys.
What is a Graph?
A graph is a data structure for representing connections among items, and consists of vertices connected by edges. A vertex represents an item in a graph. An edge represents a connection between two vertices in a graph.
What is a list ?
A list is an ADT for holding ordered data. - - Array, linked list
What is a Dynamic array?
A dynamic array is an ADT for holding ordered data and allowing indexed access. - Array
What is a Stack?
A stack is an ADT in which items are only inserted on or removed from the top of a stack.
- Linked list
What is a Queue?
A queue is an ADT in which items are inserted at the end of the queue and removed from the front of the queue. —- Linked list
What is a Deque?
A deque (pronounced “deck” and short for double-ended queue) is an ADT in which items can be inserted and removed at both the front and back.
- Linked list