Data Structures and Algorithms
Data Structures and Algorithms
(Practice Question)
Topic: Graphs
MCQ’s
Subjective Question
1. Define the difference between a directed graph and an undirected graph with
examples.
2. Explain the role of a priority queue in Dijkstra's algorithm.
3. What is the difference between a graph's adjacency list and adjacency matrix
representation?
4. Write the steps involved in the BFS traversal of a graph.
5. Explain the term cycle detection in a graph and name an algorithm for detecting
cycles.
6. What is a minimum spanning tree, and where is it used?
7. Explain the difference between a tree and a graph.
8. Define a cycle in a graph. How can you detect a cycle in a directed graph?
9. What are the applications of graph algorithms in real-world scenarios?
10. Explain the concept of topological sort and its significance.
11. Describe the steps involved in implementing Dijkstra's algorithm.
12. What is the difference between a weighted graph and an unweighted graph?
13. Depth-First Search:
a) Write the pseudocode for Depth-First Search (DFS).
b) Perform DFS traversal on the graph below starting from vertex undirected (a)
directed (1):