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