# Data Structures Flashcards
Table of Contents
- 1. Data Structures Flashcards
- 1.1. Array drill data_structures
- 1.2. Linked List drill data_structures
- 1.3. Stack drill data_structures
- 1.4. Queue drill data_structures
- 1.5. Tree drill data_structures
- 1.6. Binary Search Tree (BST) drill data_structures
- 1.7. Hash Table drill data_structures
- 1.8. Graph drill data_structures
- 1.9. Heap drill data_structures
1. Data Structures Flashcards
1.1. Array drill data_structures
1.1.1. Front
What is an array in data structures?
1.1.2. Back
An array is a collection of elements stored at contiguous memory locations, each identified by an index or a key.
1.2. Linked List drill data_structures
1.2.1. Front
What is a linked list?
1.2.2. Back
A linked list is a linear data structure where elements are stored in nodes, and each node points to the next node in the sequence.
1.3. Stack drill data_structures
1.3.1. Front
Describe a stack and its primary operations.
1.3.2. Back
A stack is a Last-In-First-Out (LIFO) data structure. Primary operations are:
- Push: Add an element to the top
- Pop: Remove the top element
- Peek: View the top element without removing it
1.4. Queue drill data_structures
1.4.1. Front
What is a queue and its main operations?
1.4.2. Back
A queue is a First-In-First-Out (FIFO) data structure. Main operations include:
- Enqueue: Add an element to the rear
- Dequeue: Remove an element from the front
- Front: View the front element without removing it
1.5. Tree drill data_structures
1.5.1. Front
What is a tree in data structures?
1.5.2. Back
A tree is a hierarchical data structure consisting of nodes connected by edges. It has a root node and subtrees of children with a parent node.
1.6. Binary Search Tree (BST) drill data_structures
1.6.1. Front
What are the key properties of a Binary Search Tree?
1.6.2. Back
- Each node has at most two children
- The left subtree of a node contains only nodes with keys less than the node's key
- The right subtree of a node contains only nodes with keys greater than the node's key
- Both left and right subtrees must also be binary search trees
1.7. Hash Table drill data_structures
1.7.1. Front
What is a hash table and its primary benefit?
1.7.2. Back
A hash table is a data structure that implements an associative array abstract data type, a structure that can map keys to values. Its primary benefit is providing fast (O(1) average case) insertion, deletion, and lookup operations.
1.8. Graph drill data_structures
1.8.1. Front
What is a graph in data structures?
1.8.2. Back
A graph is a non-linear data structure consisting of vertices (or nodes) and edges that connect these vertices. It is used to represent networks, relationships, and connections between objects.
1.9. Heap drill data_structures
1.9.1. Front
What is a heap and its types?
1.9.2. Back
A heap is a specialized tree-based data structure that satisfies the heap property. Two types are:
- Max Heap: Parent nodes are always greater than or equal to their children
- Min Heap: Parent nodes are always less than or equal to their children