My Cart
Your Cart 0

    Your cart is empty.

  • Total (Amount) ₹0.00
Previous year question hub

Graphs, Traversals and Shortest Paths - Programming, Data Structures and Algorithms - Data Science & Artificial Intelligence Previous Year Questions

Practice Graphs, Traversals and Shortest Paths - Programming, Data Structures and Algorithms - Data Science & Artificial Intelligence previous year questions organised from real papers, with year-wise coverage and clear topic navigation.

3Papers
3Years
7Questions
1Topics

Graphs, Traversals and Shortest Paths question pattern

Every graph below is calculated only from this selection.

Questions by year

Compare question counts across years.

Difficulty distribution

How the classified questions are distributed by difficulty.

Medium 6 85.7%
Hard 1 14.3%

Question type distribution

MCQ, numerical, multiple-select and other formats found in these papers.

MSQ 4 57.1%
MCQ 2 28.6%
Numerical Answer Type (NAT) 1 14.3%

Subject weightage

Top subjects by unique question coverage.

Data Science & Artificial Intelligence
7 Qs

Most asked topics

Top topics across the included previous year papers.

Programming, Data Structures and Algorithms
7 Qs

Subtopic coverage

Top subtopics inside this exact selection.

Graphs, Traversals and Shortest Paths
7 Qs

Paper coverage

Question coverage for the most populated papers. Every active PYP paper remains listed below.

Data Science and Artificial Intelligence (DA) 2026
2 Qs
Data Science & Artificial Intelligence (DA) 2025
2 Qs
Data Science & Artificial Intelligence (DA) 2024
3 Qs

Included previous year papers

Newest papers appear first. Search these papers or sort by year and name.

Paper nameYearPDFAttempt
Data Science and Artificial Intelligence (DA) 20262026
2 questions in this view
2026
Data Science & Artificial Intelligence (DA) 20252025
2 questions in this view
2025
Data Science & Artificial Intelligence (DA) 20242024
3 questions in this view
2024

All Graphs, Traversals and Shortest Paths previous year questions

Practice every matching question in batches of 20, with every available option.

1
2024 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science & Artificial Intelligence (DA) 2024
Consider performing depth-first search (DFS) on an undirected and unweighted graph \( G \) starting at vertex \( s \). For any vertex \( u \) in \( G \), \( d[u] \) is the length of the shortest path from \( s \) to \( u \). Let \( (u, v) \) be an edge in \( G \) such that \( d[u] < d[v] \). If the edge \( (u, v) \) is explored first in the direction from \( u \) to \( v \) during the above DFS, then \( (u, v) \) becomes a ______ edge.
Open complete paper
2
2024 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science & Artificial Intelligence (DA) 2024
Consider the following tree traversals on a full binary tree:
(i) Preorder
(ii) Inorder
(iii) Postorder
Which of the following traversal options is/are sufficient to uniquely reconstruct the full binary tree?
Open complete paper
3
2024 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science & Artificial Intelligence (DA) 2024
Consider the directed acyclic graph (DAG) below:
Which of the following is/are valid vertex orderings that can be obtained from a topological sort of the DAG?

Question diagram

Open complete paper
4
2025 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science & Artificial Intelligence (DA) 2025
Let \(G\) be a simple, unweighted, and undirected graph. A subset of the vertices and edges of \(G\) are shown below.
[Image]
It is given that \(a - b - c - d\) is a shortest path between \(a\) and \(d\); \(e - f - g - h\) is a shortest path between \(e\) and \(h\); \(a - f - c - h\) is a shortest path between \(a\) and \(h\). Which of the following is/are NOT the edges of \(G\)?

Question diagram

Open complete paper
5
2025 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science & Artificial Intelligence (DA) 2025
Consider a directed graph \(G = (V, E)\), where \(V = \{0, 1, 2, \dots, 100\}\) and \(E = \{(i, j) : 0 < j - i \le 2, \text{for all } i, j \in V\}\). Suppose the adjacency list of each vertex is in decreasing order of vertex number, and depth-first search (DFS) is performed at vertex 0. The number of vertices that will be discovered after vertex 50 is _________(Answer in integer)
Open complete paper
6
2026 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science and Artificial Intelligence (DA) 2026
You are given the following Pre-order and In-order traversals of a Binary Tree T with nodes E, F, G, P, Q, R, S.
Pre-order:    P    Q    S    E    R    F    G
In-order:     S    Q    E    P    F    R    G
Which of the following statements is/are true about the Binary Tree T?
Open complete paper
7
2026 · Data Science & Artificial Intelligence · Programming, Data Structures and Algorithms · Graphs, Traversals and Shortest Paths
Data Science and Artificial Intelligence (DA) 2026
Consider a directed graph G = (V, E), where V is the finite set of vertices and E is the set of directed edges between the vertices. G may contain cycles but there is no self-loop. Further, G may not be strongly connected.
Let GR be the graph obtained by reversing the directions of all the edges in G without changing the set of vertices.
Assume that Breadth First Search (BFS) or Depth First Search (DFS) from any given vertex v of a graph visits only the reachable vertices from v in that graph.
Which of the following statements must always be true, regardless of the structure of G?
Open complete paper