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