I. $a-b$
II. $d-f$
III. $b-f$
IV. $d-c$
V. $d-e$
Choose the correct answer from the options given below:
Using Kruskal's algorithm, edges are selected in increasing order of weight.
From the graph:
$a-b = 1$
$d-f = 1$
$b-f = 2$
$d-c = 2$
$d-e = 3$
So, the valid order must follow:
Weight $1$ edges first:
$I, II$ in any order
Then weight $2$ edges:
$III, IV$ in any order
Then weight $3$ edge:
$V$
Now check option (c):
II, I, III, V, IV
Here, edge $V = d-e$ has weight $3$, but edge $IV = d-c$ has weight $2$.
So, selecting $V$ before $IV$ violates Kruskal's increasing weight rule.
Therefore, this order cannot be used.
Insert words sequentially into BST.
banana → root
peach → right of banana
apple → left of banana
pear → right of peach
coconut → left of peach
mango → right of coconut
papaya → right of mango
Longest path:
banana → peach → coconut → mango → papaya
Number of edges = 4
For a 3D array $A[a][b][c]$ stored in row major order:
Address of $A[r][s][t]$ is
Base address + $w[(r \times b \times c) + (s \times c) + t]$
So,
Address = $ A[0][0][0] + w(bcr + c*s + t)$
Statement I is incorrect because if f = O(g), then f grows no faster than g. So, g is not smaller than f.
Statement II is also incorrect because exponential time is generally represented as exponential in input size, not O(2^k) where k is a constant.
| List I | List II |
|---|---|
| (A) Topological sort of DAG | (I) $O(V+E)$ |
| (B) Kruskal's MST algorithm | (II) $O(VE)$ |
| (C) Bellman-Ford's single-source shortest path algorithm | (III) $\theta(V+E)$ |
| (D) Floyd-Warshall's all pair shortest path algorithm | (IV) $\theta(V^3)$ |
Online Test Series, Information About Examination,
Syllabus, Notification
and More.
Online Test Series, Information About Examination,
Syllabus, Notification
and More.