GATE CS 2021, set 2 · Question 26 · Algorithms · Numerical answer (NAT) · 1 mark · no negative marks

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 ______.

Answer

Answer 1

Answer from the official GATE CS 2021 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes