retagged by
587 views
0 votes
0 votes

We write a new algorithm by considering the fact that number of comparisons required by Selection Sort can be reduced by considering elements in pairs and finding the minimum and maximum element at the same time.

What will be the time complexity of the new algorithm for comparisons of Selection Sort?

  1.    $O/2$
  2.    $O(n)/4$
  3.    $O(n)$
  4.    $O$$(\log n)$
retagged by

1 Answer

Best answer
1 votes
1 votes
The new algorithm will only reduce the number of comparisons but will not reduce the complexity.
selected by
Answer:

Related questions

1 votes
1 votes
1 answer
2
Bikram asked Feb 9, 2017
186 views
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$ $2$ $3$ $5$ $7$ $9$$3$ $1$ $2$ $5$...
2 votes
2 votes
1 answer
4
Bikram asked Feb 9, 2017
830 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} \...