Question 40

The figure below represents a ______ sort. Figure (tree):

The figure below represents a ______ sort. Figure (tree): Leaves (left to right): 44, 55, 12, 42, 94, 18, 06, 67 Level above leaves: 44 (from 44, 55), 12 (from 12, 42), 18 (from 94, 18), 06 (from 06, 67) Next level: 12 (from 44, 12), 06 (from 18, 06) Root: 06 (from 12, 06)
  1. ABubble
  2. BShake
  3. CTree
  4. DInsertion
Show answerHide answer

Correct answer: (C) Tree

Explanation

The figure compares pairs, moves the smaller key up each level and puts the minimum (06) at the root. This tournament-style structure is tree (tournament) sort.

From DSSSB TGT Computer Science Practice Set 1

This is question 40 of DSSSB TGT Computer Science Practice Set 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.