veeaechone
asked on
C++ selection sort and insertion sort
I would like it if someone would check my answers to make sure I am understanding the sorts properly. Please and thank you.
Consider the array based list of (10, 4, 8, 2, 7) as input for selection sort and insertion sort algorithms in the following questions:
The number of comparisons made by the selection sort is: 3
The number of comparisons made by the insertion sort is: 7
Note that each swap requires 3 moves. The number of moves made by the selection sort is: 9
The number of moves made by the insertion sort is: 7
Consider the array based list of (10, 4, 8, 2, 7) as input for selection sort and insertion sort algorithms in the following questions:
The number of comparisons made by the selection sort is: 3
The number of comparisons made by the insertion sort is: 7
Note that each swap requires 3 moves. The number of moves made by the selection sort is: 9
The number of moves made by the insertion sort is: 7
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER