UGC-NET Jun 2015 · Arrays & Matrix Representation

MCQ · 2 marks · Problem PROG-DSTR-0052

Level order Traversal of a rooted Tree can be done by starting from root and performing:
  1. A
    Breadth First Search
  2. B
    Depth First Search
  3. C
    Root Search
  4. D
    Deep Search

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionLevel order visits the root, then every node at depth 1, then every node at depth 2, and so on. That is exactly the order in which breadth first search (a FIFO queue started at the root) discovers the nodes.Depth first search goes down one branch to a leaf before visiting the siblings, so it does not give level order; "root search" and "deep search" are not standard traversals.Answer: A

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