retagged by
205 views
1 votes
1 votes

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$
retagged by

1 Answer

Best answer
2 votes
2 votes
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

2 votes
2 votes
1 answer
3
Bikram asked Feb 9, 2017
880 views
Consider the following set of messages with their frequencies: $$\begin{array}{|c|c|c|} \hline \textbf{Message} & \textbf{Frequency} \\ \hline A & 50\: \text{million} \...