Explore topic-wise MCQs in Data Structures and Algorithms.

This section includes 33 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.

1.

The problem of maximizing the sum of weights on edges connecting matched pairs of vertices is?

A. Maximum- mass matching
B. Maximum bipartite matching
C. Maximum weight matching
D. Maximum node matching
Answer» D. Maximum node matching
2.

Which is the correct technique for finding a maximum matching in a graph?

A. DFS traversal
B. BFS traversal
C. Shortest path traversal
D. Heap order traversal
Answer» C. Shortest path traversal
3.

An optimal solution satisfying men's preferences is said to be?

A. Man optimal
B. Woman optimal
C. Pair optimal
D. Best optimal
Answer» B. Woman optimal
4.

What is the simplest method to prove that a graph is bipartite?

A. It has a cycle of an odd length
B. It does not have cycles
C. It does not have a cycle of an odd length
D. Both odd and even cycles are formed
Answer» D. Both odd and even cycles are formed
5.

What is the total number of iterations used in a maximum- matching algorithm?

A. [n/2]
B. [n/3]
C. [n/2]+n
D. [n/2]+1
Answer» E.
6.

A matching that matches all the vertices of a graph is called?

A. Perfect matching
B. Cardinality matching
C. Good matching
D. Simplex matching
Answer» B. Cardinality matching
7.

Which of the following problems is related to stable marriage problem?

A. Choice of school by students
B. N-queen problem
C. Arranging data in a database
D. Knapsack problem
Answer» B. N-queen problem
8.

What is the efficiency of algorithm designed by Hopcroft and Karp?

A. O(n+m)
B. O(n(n+m)
C. O(√n(n+m))
D. O(n+2)
Answer» D. O(n+2)
9.

What is the prime task of the stable marriage problem?

A. To provide man optimal solution
B. To provide woman optimal solution
C. To determine stability of marriage
D. To use backtracking approach
Answer» D. To use backtracking approach
10.

_____________ is a matching with the largest number of edges.

A. Maximum bipartite matching
B. Non-bipartite matching
C. Stable marriage
D. Simplex
Answer» B. Non-bipartite matching
11.

Can stable marriage cannot be solved using branch and bound algorithm.

A. True
B. False
Answer» C.
12.

A matching M is maximal if and only if there exists no augmenting path with respect to M.

A. True
B. False
Answer» B. False
13.

How many colours are used in a bipartite graph?

A. 1
B. 2
C. 3
D. 4
Answer» C. 3
14.

Who formulated a straight forward backtracking scheme for stable marriage problem?

A. McVitie and Wilson
B. Gale
C. Ford and Fulkerson
D. Dinitz
Answer» B. Gale
15.

What is the length of an augmenting path?

A. Even
B. Odd
C. Depends on graph
D. 1
Answer» C. Depends on graph
16.

Who was the first person to solve the maximum matching problem?

A. Jack Edmonds
B. Hopcroft
C. Karp
D. Claude Berge
Answer» B. Hopcroft
17.

What is the efficiency of Gale-Shapley algorithm used in stable marriage problem?

A. O(N)
B. O(N log N)
C. O(N2)
D. O(log N)
Answer» D. O(log N)
18.

Stable marriage problem is an example of?

A. Branch and bound algorithm
B. Backtracking algorithm
C. Greedy algorithm
D. Divide and conquer algorithm
Answer» C. Greedy algorithm
19.

Which of the following algorithms does Stable marriage problem uses?

A. Gale-Shapley algorithm
B. Dijkstra's algorithm
C. Ford-Fulkerson algorithm
D. Prim's algorithm
Answer» B. Dijkstra's algorithm
20.

Maximum matching is also called as maximum cardinality matching.

A. True
B. False
Answer» B. False
21.

Which one of the following is an application for matching?

A. Proposal of marriage
B. Pairing boys and girls for a dance
C. Arranging elements in a set
D. Finding the shortest traversal path
Answer» C. Arranging elements in a set
22.

How many 2*2 matrices are used in this problem?

A. 1
B. 2
C. 3
D. 4
Answer» C. 3
23.

What happens when a free man approaches a married woman?

A. She simply rejects him
B. She simply replaces her mate with him
C. She goes through her preference list and accordingly, she replaces her current mate with him
D. She accepts his proposal
Answer» D. She accepts his proposal
24.

If there are n couples who would prefer each other to their actual marriage partners, then the assignment is said to be unstable.

A. True
B. False
Answer» B. False
25.

In case of stability, how many symmetric possibilities of trouble can occur?

A. 1
B. 2
C. 4
D. 3
Answer» C. 4
26.

What is the space complexity of quick search algorithm?

A. O(n)
B. O(log n)
C. O(m+n)
D. O(mn)
Answer» B. O(log n)
27.

The searching phase in quick search algorithm has good practical behaviour.

A. true
B. false
Answer» B. false
28.

When a free man proposes to an available woman, which of the following happens?

A. She will think and decide
B. She will reject
C. She will replace her current mate
D. She will accept
Answer» E.
29.

In a bipartite graph G=(V,U,E), the matching of a free vertex in V to a free vertex in U is called?

A. Bipartite matching
B. Cardinality matching
C. Augmenting
D. Weight matching
Answer» D. Weight matching
30.

Who created the Rabin Karp Algorithm?

A. Joseph Rabin and Michael Karp
B. Michael Rabin and Joseph Karp
C. Richard Karp and Michael Rabin
D. Michael Karp and Richard Rabin
Answer» D. Michael Karp and Richard Rabin
31.

Quick search algorithm starts searching from the right most character to the left.

A. true
B. false
Answer» C.
32.

What is the basic principle in Rabin Karp algorithm?

A. Hashing
B. Sorting
C. Augmenting
D. Dynamic Programming
Answer» B. Sorting
33.

Given input string = “ABCDABCATRYCARCABCSRT” and pattern string = “CAT”. Find the first index of the pattern match using quick search algorithm.

A. 2
B. 6
C. 11
D. 14
Answer» C. 11