Question: C + + Learn how to declare a function that traverses an array. Assignment: Write the definition of a function named selectionSort that takes in

C++
Learn how to declare a function that traverses an array.
Assignment: Write the definition of a function named selectionSort that takes in the following parameters:
an array of 'string' named arr
an 'int' n representing the number of elements in arr
The function has a return type void. It simply applies a selection sort, in descending order.
Note: The swap function has already been defined and is available to be called from your code.
Hint: Your code should sort the array in descending order, which means the elements will be ordered from the highest value to the lowest value.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!