Are you a student gearing up for your exams in 2023? Are you struggling to find comprehensive study materials specifically tailored to algorithms and data structures? Look no further, as we have got you covered! We will provide you with an extensive selection of MCQ on Algorithms and Data Structures in Pdf for 2023 exams.
Whether you are studying computer science, software engineering, or any related field, our collection of MCQs will serve as a valuable resource to enhance your exam preparation. So, let’s dive in and discover the perfect set of practice questions that will help solidify your understanding of these fundamental concepts.
MCQ on Algorithms and Data Structures in Pdf for 2023 exams
1. ___ is used in dividing the larger problems into subproblems.
2. The data structure which contains the hierarchical relationship between various elements is called a ___.
3. Insertion and deletion of an element in the queue are done in ___ and ___ ends respectively.
Ans. Rear and Front
4. ___ is called a list of the finite number of elements of similar data types.
5. ___ is used in finding the location of the record with the given key value.
6. The ___ of the algorithm is depending on the time and space it uses.
7. ___ is used in combining the records in two different files into a single file.
8. ___ is a linear collection of nodes.
Ans. Linked list
9. ___ and ___ are the two fields of the linked list.
Ans. Data and Link fields
10. Processing each node of the linked list exactly once is called ___.
11. Stack allows insertion and deletion at one end called ___.
12. Insertion and deletion of the element from the stack is performed with ___ and ___ operation.
Ans. Push and pop
13. Before every insertion into the stack ___ condition needs to be checked.
14. P+Q and (X+Y)* Z is the ___ expression.
15. Addition is having higher precedence then Multiplication state. True/False.
16. Specify the method for deleting and element from the queue ___.
17. ___ and ___ are the two pointers are used in the queue.
Ans. FRONT and REAR
18. New node can be availed from the ___ list while inserting a new element into the queue.
19. ___ is used to find the location of an item in a linked list.
20. ___ is used to store the unused memory cells.
Ans. Free- storage list
21. Tree is a non-linear data structure state. True/False
22. List of nodes that belong to the same parent is called ___.
23. Tree with only left subtree is called ___.
Ans. Left skewed tree
24. ___ order traversal follows the pattern as root, left, right.
25. In an array representation of binary tree the right child of the root will be at the location at ___.
26. In a complete binary tree right child of a node can be identified by ___.
27. Breadth-first traversal otherwise called as ___.
Ans. Level order traversal
28. Linked representation of the tree facilitates the efficiency of memory. True/False.
29. Conversion of the tree to the binary tree makes the tree ___.
30. Incomplete tree is very efficient in memory management. (True/False)
31. ___ is used to denote the leaf node representation as 1 in preorder sequential representation.
32. ___ and ___ are the vectors used for postorder sequential representation.
Ans. POST and DEGREE
33. A graph containing only isolated vertices is called ___.
a) isolated graph
b) null graph
c) directed graph
Ans. b) – null graph
34. In a directed graph, the ___ of a vertex v is the number of edges of leaving v, and its ___ is the number of edges ending at v.
a) in-degree, out-degree
b) out-degree, in-degree
c) degree, edges
d) edges, degree
Ans. b) Out-degree, In-degree
35. In the adjacency matrix, ‘1’ is marked in a cell if there exists an edge between two nodes that index that cell. (True/false)
36. A null graph consists of V vertices but no edges, then the adjacency matrix has all of its entire elements as___.
37. In the incidence matrix, If the kth edge is (vi, vj ) then the kth column has a value ___ in the ith row, ___ in the jth row and ___ elsewhere.
Ans. a) 1,-1,0
38. For adjacency list the number of distinct unordered pairs (vi, vj) with vi,≠ vj in a graph with n vertices is___.
Ans. n (n-1)/2
39. The three properties associated with list structures are:
a) Order, depth, length
b) Degree, vertices, edges
c) Atom, element, list
d) Cost, weight, data
Ans. a) order, depth, length
40. In-Depth First search the same node is visited more than once. (True/False)
41. Breadth-first search algorithm uses a ___ data structure to perform the search. (Pick the right option)
Ans. c) Queue
42. A spanning tree is known as a spanning forest if the graph is undirected and connected. (True/False)
43. If the graph is not connected in the spanning tree, then it is known as ___.
Ans. spanning forest
44. ___ technique is used to collect all the free cells and store that in the free pool.
Ans. Garbage Collection
45. ___ and ___ are the types of the linked list.
Ans. Doubly and Circular linked list
46. The Doubly linked list is also called ___.
Ans. Two- way list
47. Nodes do not have any clear parent-child relationship like in the tree. (True/False)
48. In an undirected graph, edge (v1,v2) is equivalent to edge ___ since they are unassigned.
49. A directed graph is also referred to as an ___.
Ans. Oriented Graph
50. The number of edges incident out of a vertex v is called the ___.
51. DAGs may have more than one possible topological order. (True/False)
52. Descriptor’s successor must appear after that descriptor in ___ ordering for topological sort.
Ans. a) linear
53. Dijkstra’s algorithm can be applied for unweighted directed graph. (True/False)
54. In Dijkstra’s algorithm, ___ are assigned to each vertex.
Ans. d) labels
55. Minimum spanning tree is always unique. (True/False)
56. Minimum spanning tree is a graph with weight ___ than or ___ to the weight of every other spanning tree.
a) less, greater
b) less, equal
c) greater, equal
d) greater, always greater.
Ans. b) less, equal
57. Prim’s minimum spanning tree algorithm is known as ___ style algorithm.
Ans. a) greedy
58. There are certain polynomial-time algorithms that can be considered tractable. (True/False)
59. If the solution is found out to minimize or maximize a given value, then such type of problems are ___ problems.
60. An algorithm that returns near-optimal solutions (in polynomial time) is called the ___ algorithm.
61. A problem is NP-hard if an algorithm to solve it in (deterministic) polynomial time would make it possible to solve all ___ problems in polynomial time.
Ans. c) NP
62. Identify the algorithm given below:
For k = 0 to n-1
For m = k + 1 to n
if (A[m] < A[k]
Swap(A[m], A[k]); // swap min to front
Ans. selection sort
63. A vertex v is said to be an isolated vertex if the out-degree of v and the in-degree of v are equal to ___.
64. Let X be a set, and R a relation on X. The relation R is said to be ___ if a, b, c ∈ R, aRb, bRc ⇒ aRc.
65. Each maximal connected subgraph of a digraph D, is said to be a ___ of D
66. A closed directed walk that traverses every edge of D exactly once, is called a ___.
Ans. Directed Euler line
67. A tree of n vertices contains ___ edges.
Ans. n – 1
68. Let D be a digraph with p vertices. The adjacency matrix of D is a ___ matrix
69. Sorting is the process of arranging the content in some order based on ___ criterion.
70. Merge sort uses ___ technique to sort the elements.
The MCQs on Algorithms and Data Structures in PDF format for 2023 exams have provided a valuable resource for students to test their knowledge and understanding.
These multiple-choice questions offer a comprehensive review of key concepts and principles, allowing students to practice and improve their problem-solving skills. We hope that these MCQs have helped you prepare for your upcoming exams and gain a stronger grasp of algorithms and data structures.
If you found these MCQs helpful, we encourage you to share them with your peers on social media, so they too can benefit from this valuable resource. Together, let’s strive for success in our exams and continue to learn and grow in the field of algorithms and data structures.
You may also like