A) Red-Black tree B) B-tree C) binary search tree (BST) D) AVL tree
A) The value of the node B) The number of levels in the tree C) The number of nodes on the path from the root to that node D) The height of the node
A) B-tree B) Red-Black tree C) Binary search tree (BST) D) AVL tree
A) Preorder B) Postorder C) Inorder D) Level order
A) Leaf node B) Root node C) Internal node D) Sibling node
A) The height of the tree B) The total number of nodes C) The maximum number of children of any node D) The number of edges from the root to the deepest leaf
A) 3 B) 0 C) 2 D) 1
A) AVL tree B) Trie C) Binary search tree D) B-tree
A) Trie B) AVL tree C) Binary tree D) B-tree
A) Inorder B) Level order C) Preorder D) Postorder
A) The number of leaves in the tree B) The number of nodes in the tree C) The distance from the root to the deepest leaf D) The maximum number of children a node can have
A) Postorder B) Inorder C) Preorder D) Level order
A) Internal node B) Sibling node C) Leaf node D) Unary node
A) A hierarchical data structure B) A hash table C) A graph D) A linear data structure
A) It could be either a left or a right child. B) It cannot have only one child. C) It must be a left child. D) It must be a right child.
A) To minimize the height of the tree B) To store data in a random order C) To store data in a sorted order D) To ensure the tree is balanced
A) Sibling node B) Unary node C) Internal node D) Leaf node
A) Logarithmic in the number of nodes B) Quadratic in the number of nodes C) Linear in the number of nodes D) Constant
A) A cycle without any vertices B) A set of all nodes in the graph C) A route connecting two nodes D) A collection of edges
A) All vertices are reachable from one another B) It has multiple components C) It is a directed graph only D) There are no edges
A) A collection of arrays B) A collection of nodes and edges C) A type of tree D) A linear data structure
A) Kruskal's algorithm B) Dijkstra's algorithm C) Prim's algorithm D) Depth-first search
A) Two sets of vertices where edges only connect nodes from different sets B) Only one vertex C) A single set of vertices D) Vertices that form a cycle
A) The number of edges connected to it B) The distance to the farthest vertex C) The number of paths from that vertex D) The total number of vertices in the graph
A) The total number of edges B) The distance between two vertices C) A connection between two vertices D) The number of vertices in a graph
A) The edge connects two nodes of different types B) The edge does not exist C) The edge can only be traversed in one way D) The edge can be traversed in both ways
A) Exactly 2 B) 1 or more C) 0 or 1 D) Infinite
A) A graph where all edges have the same weight B) A graph where edges have values associated with them C) A graph with no edges D) A graph where vertices have weights
A) To perform sorting operations. B) To represent node and edge connectivity in a graph. C) To store edge weights only. D) To simplify graph traversal.
A) A graph with no edges B) A graph where all vertices are connected by edges C) A graph that can be divided into two or more subgraphs D) A graph that contains cycles
A) It is always directed. B) It has no parallel edges or self-loops. C) It allows weighted edges. D) It contains at least one cycle.
A) A path that visits every vertex B) A disconnected graph C) A closed path where the starting and ending vertices are the same D) A graph with no edges
A) Stack B) Linked list C) Array only D) Adjacency matrix
A) Bipartite Graph B) Directed Graph C) Undirected Graph D) Complete Graph
A) Bipartite Graph B) Weighted Graph C) Directed Graph D) Complete Graph
A) A linear data structure B) A non-linear data structure C) A data type in C++ D) A hierarchical data structure
A) The item in the middle B) The first item added C) The item at random D) The last item added
A) Dequeue B) Enqueue C) Push D) Pop
A) Enqueue B) Pop C) Push D) Dequeue
A) stack B) tree C) linked list D) queue
A) Only insertion B) Insertion at one end and deletion at the other end C) Insertion and deletion at both ends D) Only deletion
A) Elements are discarded B) An error is generated C) Elements are added at the beginning of the queue D) Elements are added at the end of the queue
A) Circular Queue B) Deque C) Priority Queue D) Banana queue
A) O(n) for enqueue and O(1) for dequeue B) O(n) for both enqueue and dequeue C) O(1) for both enqueue and dequeue D) O(n) for both enqueue and dequeue
A) Using linked lists B) Using stacks C) Using dynamic arrays D) Using arrays
A) A queue that processes elements in a random order B) A queue that gives priority to older elements C) A queue with a fixed size D) A queue in which elements are processed based on their priority
A) Stack B) Circular queue C) Binary heap D) Queue
A) A deque can only dequeue elements from the front. B) A deque can enqueue and dequeue elements at both ends. C) A deque can only enqueue elements at the front. D) A regular queue is faster than a deque.
A) The element added most recently B) The element with the highest priority C) The element with the lowest priority D) The element added least recently
A) Normal Queue B) deque C) Priority Queue D) Circular Queue
A) Priority Queue B) Deque C) Stack D) Circular Queue
A) n-m B) m C) n D) 0
A) The order is implementation-specific. B) They are processed in a random order. C) The last element added is processed first. D) The first element added is processed first.
A) Undo functionality in text editors B) Print spooling C) Sorting algorithms D) Breadth-first search (BFS)
A) None of the above B) Both enqueue and dequeue C) Dequeue D) Enqueue
A) remove_front() B) pop_front() C) front() D) dequeue()
A) Better memory utilization B) No advantage; they are equivalent C) Simpler implementation D) Faster enqueue operation
A) Deque B) Cache C) Priority Queue D) Circular Queue
A) Stack B) Circular Queue C) Priority Queue D) Deque
A) It has faster enqueue and dequeue operations. B) It may lead to wasted memory for a large maximum size. C) It allows for dynamic sizing. D) It is not suitable for implementing a priority queue.
A) The first element added B) The last element added C) The element with the highest value D) The element with the lowest value
A) Normal Queue B) Deque C) Priority Queue D) Circular Queue
A) Stack B) Binary Tree C) Linked List D) heap data structure
A) pop_back() B) remove_back() C) back() D) dequeue()
A) Normal Queue B) Priority Queue C) Circular Queue D) Age-Ordered Queue
A) Compare the rear and front pointers modulo the queue size. B) Check if the rear pointer is ahead of the front pointer by 1. C) Circular queues cannot be full. D) Check if the front pointer is ahead of the rear pointer by 1.
A) The element added first is removed. B) The element with the higher value is removed. C) It's implementation-dependent. D) The element with the lower value is removed.
A) Feasibility B) Output C) Input D) Dependent E) Unambiguous
A) Reusability B) Space Complexity C) Efficiency D) Abstraction E) Time complexity
A) Efficiency B) Reusability C) Space Complexity D) Time complexity E) Abstraction
A) Reusability B) Efficiency C) Abstraction D) Time complexity
A) Homogeneous or non-homogeneous B) Static or dynamic C) Linear or non-linear
A) Linear or non-linear B) Static or dynamic C) Homogeneous or non-homogeneous
A) Static or dynamic B) Linear or non-linear C) Homogeneous or non-homogeneous
A) Data classification B) Content C) Context D) User |