GATE & PSUs - Computer Science & Information Technology (CS & IT)

Graph Algorithms (BFS, DFS, Dijkstra, Prim/Kruskal) question bank (Data Structures & Algorithms)

Practice 6 free GATE & PSUs - Computer Science & Information Technology (CS & IT) Data Structures & Algorithms - Graph Algorithms (BFS, DFS, Dijkstra, Prim/Kruskal) questions with answers and step-by-step solutions.

Q1.
[Graph Algorithms (BFS, DFS, Dijkstra, Prim/Kruskal) Concept 4] What is the worst-case time complexity of building a max-heap of $n$ elements from an arbitrary unsorted array using the bottom-up `Build-Heap` procedure?

(A)
$\Theta(n)$
(B)
$\Theta(n \log n)$
(C)
$\Theta(n^2)$
(D)
$\Theta(\log n)$
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view
Q2.
[Graph Algorithms (BFS, DFS, Dijkstra, Prim/Kruskal) Concept 10] What is the worst-case time complexity of building a max-heap of $n$ elements from an arbitrary unsorted array using the bottom-up `Build-Heap` procedure?

(A)
$\Theta(n)$
(B)
$\Theta(n \log n)$
(C)
$\Theta(n^2)$
(D)
$\Theta(\log n)$
Show answer & solution
Verified Answer & Solution Locked
Sign in to your free student account to reveal verified answers, instant hints, and detailed explanations.
Sign in to view
Protected Questions

Unlock All 5 Questions in Graph Algorithms (BFS, DFS, Dijkstra, Prim/Kruskal)

Log in or sign up free to access every question with complete solutions, create chapter practice tests, and track your performance.

Sign up free to access all 5 questions

Unlock every Graph Algorithms (BFS, DFS, Dijkstra, Prim/Kruskal) question, generate papers, and practice at your own pace.