GATE CS 2021 · Set-2 · Shortest Path Algorithms

NAT · 1 mark · Problem PROG-GRPH-0125

Consider a complete binary tree with 7 nodes. Let A denote the set of first 3 elements obtained by performing Breadth-First Search (BFS) starting from the root. Let B denote the set of first 3 elements obtained by performing Depth-First Search (DFS) starting from the root.The value of |A-B| is

Numerical answer (NAT).

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: [1.0, 1.0].See full step-by-step discussion on GateOverflow: https://gateoverflow.in/357524/gate-cse-2021-set-2-question-16

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com