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