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