0% found this document useful (0 votes)
10 views7 pages

Unit 5 - QB

The document is a question bank for the B.Tech Computer Science and Engineering program at SRM Institute of Science and Technology, focusing on Data Structures and Algorithms for the third semester of the 2023-2024 academic year. It includes course outcomes, multiple-choice questions, and descriptive questions related to various data structures and algorithms, including graphs, trees, and sorting algorithms. The document also references Bloom's Taxonomy levels for assessing the complexity of the questions.

Uploaded by

anuskapan04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

Unit 5 - QB

The document is a question bank for the B.Tech Computer Science and Engineering program at SRM Institute of Science and Technology, focusing on Data Structures and Algorithms for the third semester of the 2023-2024 academic year. It includes course outcomes, multiple-choice questions, and descriptive questions related to various data structures and algorithms, including graphs, trees, and sorting algorithms. The document also references Bloom's Taxonomy levels for assessing the complexity of the questions.

Uploaded by

anuskapan04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Ramapuram Campus, Bharathi Salai, Ramapuram, Chennai - 600089

COLLEGE OF ENGINEERING AND TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

QUESTION BANK

DEGREE / BRANCH: B.TECH. / CSE

III SEMESTER

SUB CODE & NAME: 21CSC201J & DATA STRUCTURES AND ALGORITHMS

Regulation– 2021

Academic Year 2023-2024


SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
Ramapuram Campus, Bharathi Salai, Ramapuram, Chennai-600089

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

QUESTIONBANK

SUBJECT : 18CSC201J- DATA STRUCTURES AND ALGORITHMS


SEM/YEAR:III/II
Course Outcomes
CO1: Identify linear and non-linear data structures. Create algorithms for searching and sorting
CO2: Create the different types of linked lists and evaluate its operations
CO3: Construct stack and queue data structures and evaluate its operations
CO4: Create tree data structures and evaluate its types and operations
CO5: Create graph data structure, evaluate its operations, implement algorithms to identify shortest
path

UNIT V
Introduction to Graph, Graph Traversal, Topological sorting, Minimum spanning tree – Prims
Algorithm, Kruskal’s Algorithm, Shortest Path Algorithm - Dijkstra’s Algorithm
PART-A (Multiple Choice Questions)
Q. Questions Course Competence
No Outcome BT Level
1 Other name for directed graph is ..........
a) Direct graph
b) Digraph
c) Dir-graph CO5 BT2
d) Digraph
Ans:D

2 Graph G is .............. (V,E) whereV(G) represents set of vertices


and E(G) represents setoff edges.
a) Leterally connected
b) Widely Connected CO5 BT2
c) Ordered set
d) Literally connected
Ans:C
3 The vertex with zero degree........
a) Isolated vertex
b) no cycle graph
c) non cycle graph CO5 BT2
d) circular graph
Ans:A

4 The vertex with degree one........


CO5 BT2
a) A tree graph
b) Free tree
c) A tree d
d) pendant vertex
Ans:D
5 In a graph if e=[u,v], Then u and v are called ........
a) End points of e
b) Adjacent nodes
c) Neighbours CO5 BT2
d) All of the above
Ans:D

6 A Graph is a collection of ____


a) row and columns
b) Vetices and edges BT2
CO5
c) Equations
d) None of these
Ans:B
7 A Graph G is called_____ if all nodes are fully connected
a) Cyclic graph
b) Complete graph
c) Not a graph CO5 BT2
d) Regular graph
Ans:B

8 Topological sorting for Directed Acyclic Graph (DAG) is a ______


ordering of vertices
a) Ascending
b) Decending CO5 BT2
c) Linear
d) Non Linear
Ans:B
9 Topological Sorting for a graph is not possible if the graph is not a
_____
a) Directed Acyclic Graph (DAG)
b) Directed Graph BT2
CO5
c) Linear
d) Non Linear
Ans:A

10 Which of the following is/are the operations performed by


kruskal’s algorithm?
i)sort the edges of G in increasing order by length
ii)keep a subgraph S of G initially empty
iii)builds a tree one vertex at a time
CO5 BT1
a) i, and ii only
b) ii and iii only
c) i and iii only
d) All i, ii and iii
Ans:A
11 .……………… is known as a greedy algorithm, because it chooses
at each step the cheapest edge to add to subgraph S.
a) Kruskal’s algorithm
b) Prim’s algorithm CO5 BT2
c) Dijkstra algorithm
d) Bellman ford algorithm
Ans :A
12 Dijkstra’s Algorithm cannot be applied on ______________
a) A Directed and weighted graphs
b) Graphs having negative weight function
c) Unweighted graphs CO5 BT4
d) Undirected and unweighted graphs
ANS:B

13 How many priority queue operations are involved in Dijkstra’s


Algorithm?
a) 1
b) 3 BT1
CO5
c) 2
d) 4
Ans:b

14 The maximum number of times the decrease key operation


performed in Dijkstra’s algorithm will be equal to ___________
a) Total number of vertices
b) Total number of edges
CO5 BT4
c) Number of vertices – 1
d) Number of edges – 1
Ans:b

15 Dijkstra’s Algorithm is the prime example for ___________


a) Greedy algorithm
b) Branch and bound BT2
CO5
c) Back tracking
d) Dynamic programmin
Ans:b
16 Prim’s algorithm is a ______
a) Divide and conquer algorithm
b) Greedy algorithm
c) Dynamic Programming CO5 BT2
d) Approximation algorithm
Ans:b

17 Which of the following is false about Prim’s algorithm?


a) It is a greedy algorithm
b) It constructs MST by selecting edges in increasing order of their
weights BT1
CO5
c) It never accepts cycles in the MST
d) It can be implemented using the Fibonacci heap
Ans:b
18 Kruskal’s algorithm is used to ______
a) find minimum spanning tree
b) find single source shortest path
c) find all pair shortest path algorithm CO5 BT2
d) traverse the graph
Ans:a

19 Topological sort can be applied to which of the following graphs?


a) Undirected Cyclic Graphs
b) Directed Cyclic Graphs
CO5 BT1
c) Undirected Acyclic Graphs
d) Directed Acyclic Graphs
Ans:d
20 In most of the cases, topological sort starts from a node which has
__________
a) Maximum Degree
b) Minimum Degree C05 BT2
c) Any degree
d) Zero Degree
Ans: d
21 Cost Efficient Time Complexity of Topological Sorting is? (V –
number of vertices, E – number of edges)
a) O(V + E)
b) O(V) CO5 BT2
c) O(E)
d) O(V*E)
Ans: a)
22 1. Which alternative algorithm is used when negative-weight edges
are present in the graph?
a) Floyd-Warshall algorithm
b) Kruskal's algorithm CO5 BT1
c) Breadth-First Search (BFS)
d) Bellman-Ford algorithm
Ans: d
23 In Dijkstra's algorithm, how are the initial distances set for all
vertices?
a) All distances are set to 1
b) All distances are set to infinity CO5 BT1
c) All distances are set to 0
d) Distances are determined randomly
Ans: b
24 In which type of graphs does Dijkstra's algorithm perform well?
a) Dense graphs
b) Sparse graphs
CO5 BT1
c) Directed graphs
d) Bipartite graphs
Ans: b
25 Consider the following graph. Using Kruskal’s algorithm, which edge
will be selected first?
CO5 BT2
What is the primary objective of a shortest path algorithm?
a) To find the longest path in a graph
b) To find the path with the most edges
c) To find the shortest path between two vertices in a graph
d) To find all possible paths in a graph
Ans: c
PART B (4 Marks)
1 Define Graph? CO5 BT1
2 Write short notes on adjacent nodes. CO5 BT4
3 What is the use of Kruskal’s algorithm and who discovered it? CO5 BT1
4 Compare indegree and out degree of a graph. CO5,CO6 BT4
5 What is an undirected graph? CO5 BT1
6 What is a directed graph? CO5 BT1
7 What is meant by strongly connected in a graph? CO5 BT1
8 Discuss the BFS and DFS differences CO5 BT6
PART C (12 Marks)
1 Explain the various representation of graph with example in detail? CO5 BT2
2 What is topological sort? Write an algorithm to perform topological
sort?

CO5 BT1

3 Construct the steps for implementing Dijkstra’s algorithm with an


example.
CO5 BT3

4 Explain the Graph traversal BFS and DFS in detail.

CO5 BT2

5 Construct the minimum spanning tree with suitable example in


both Krsukal and Prim’s method

CO5 BT3

Note:

1. BT Level – Blooms Taxonomy Level


2. CO – Course Outcomes

BT1 –Remember BT2 – Understand BT3 – Apply BT4 – Analyze BT5 – Evaluate BT6 – Create

You might also like