ISRO 2017 · Bubble Sort

MCQ · 1 mark · Problem PROG-SORT-0024

The number of swappings needed to sort the numbers 8 , 22, 7, 9, 31, 5, 13 in ascending order using bubble sort is
  1. A
    11
  2. B
    12
  3. C
    13
  4. D
    10

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/128694/isro2017-49

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