81.0k views
0 votes
I am sorting data that is stored over a network connection. Based on the properties of that connection, it is extremely expensive to "swap" two elements. But looping over the elements and looking at their values is very inexpensive. I want to minimize swaps above all other factors. Choose the sorting algorithm we studied that will perform the best:

User Guy Bowden
by
3.6k points

1 Answer

5 votes

Answer: Provided in the explanation section

Step-by-step explanation:

The question to this problem says;

Question:

I am sorting data that is stored over a network connection. Based on the properties of that connection, it is extremely expensive to "swap" two elements. But looping over the elements and looking at their values is very inexpensive. I want to minimize swaps above all other factors. Choose the sorting algorithm we studied that will perform the best:

ANSWER

1. Merge Sort

Because merge sort uses additional memory instead of swapping the elements.

2. Merge Sort and Quick Sort both can be used with multi processor.

cheers i hope this helps !!!

User Sachin Sarola
by
3.4k points