answersLogoWhite

0


Best Answer

Change every "<" to ">" and ">" to "<" .

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: In a selection sort when changing from ascending to descending order only---------- modifications need to be made to the algorithm?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you implement selection sort in c with graphics?

Selection sort has the following implementation: // sort an array if integers of length size in ascending order using selection sort algorithm: void selection_sort (int a[], unsigned size) { unsigned i, max; while (size &gt; 1) { max = 0; for (i=1; i!=size; ++i) if (a[i] &gt; a[max]) max = i; swap (a[max], a[--size]); } }


What is a genetic algorithm?

A method that mimics evolution and natural selection to solve the problem.


Who introduce selection sorting algorithm?

in selection sorting at first we take first element of the list and start comparing with all the successive element of that list


What are the different types of algorithm?

insertion,bubble,quick, quick3, merge, shell,heap, selection sorting


What has the author Thomas Leslie Craig written?

Thomas Leslie Craig has written: 'Computer aided algorithm selection in pattern recognition'


Which is the easiest sorting method?

There are generally eight sorting algorithms that are studied in school by computer science students. They are as follows: insertion, bubble, quick, quick3, merge, shell, heap, and selection sorting. There are different types of sorting algorithms. One would be considered good if it is accurate and efficient. Different types of sorting includes; sequential, ascending, and descending.


How many basic constructs are in computer science?

Computer Scientists have defined three constructs for a structured program or algorithm. Sequence, decision (selection), and repetition.


What are the 3 primitive logic structures?

The three primitive logic structures in programming are selection, loop and sequence. Any algorithm can be written using just these three structures.


What is the first value that is searched for in an array when using a selection sort algorithm?

The first value is marked first, and then the smallest value is searched to compare to the first and then place in the appropriate location.


What has the author John C Wiginton written?

John C. Wiginton has written: 'An algorithm for portfolio selection in linear models with upper bounds constraints' -- subject(s): Mathematics, Stocks, Investments


Who invented insertion sort?

There are no records of when insertion sort was invented because people have been sorting things using the insertion sort and selection sort algorithms since before records began; they are ancient algorithms. You cannot be credited for creating an algorithm that already exists. Shell sort, which is a refinement of insertion sort, was developed much later, in 1959 by Donald Shell. His algorithm can be credited because it takes advantage of a computer's processing abilities, whereas insertion sort and selection sort rely purely on a human's processing abilities.


If you have been given a task to do some project and to do the basic operations like searching and sorting there are many algorithms which algorithm you will select in which circumstances and why?

Selection of algorithm depnds on the programmer. So, this is not a question whose answer is same, if given by many people. Searching and Sorting can be done by various ways, this is true but the idea of using the method varies from programmer to programmer