in GATE retagged by
198 views
1 vote
1 vote

Bubble sort is used to sort the following sequence of numbers: $7 5 3 1 2 9$.

What will the sequence be after the 2$^{nd}$ iteration?

  1. $1$ $2$ $3$ $5$ $7$ $9$
  2. $3$ $1$ $2$ $5$ $7$ $9$
  3. $5$ $3$ $1$ $2$ $7$ $9$
  4. $3$ $5$ $7$ $1$ $2$ $9$
in GATE retagged by
by
198 views

1 Answer

2 votes
2 votes
Best answer
Initial sequence: 7 5 3 1 2 9

After first iteration: 5 3 1 2 7 9

After second iteration: 3 1 2 5 7 9
selected by
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

64.3k questions

77.9k answers

244k comments

80.0k users