Saturday

December 20, 2014

December 20, 2014

Posted by **Joy** on Friday, July 26, 2013 at 2:30pm.

7, 12, 5, 22, 13, 32

What is the maximum number of comparisons required for a list of 6 numbers?

How many vcomparisons did I actually need?

- Discrete Mathematics -
**MathMate**, Friday, July 26, 2013 at 3:31pmNumber of comparisons for 6 numbers:

5+4+3+2+1=15

You need all 15 comparisons unless you modify the algorithm to keep track of exchanges.

There are 4 exchanges in this particular example.

- Discrete Mathematics -
**Joy**, Friday, July 26, 2013 at 4:45pmThanks for explaining this to me!

- Discrete Mathematics :) -
**MathMate**, Friday, July 26, 2013 at 5:04pmYou're welcome!

**Answer this Question**

**Related Questions**

Discrete Mathematics - Sort with Insertion Sort and Selection Sort algorithms ...

Simple Array Process - need help with this generate only the pseudocode. No ...

CIS/Visual Logic - Design an application that accepts 10 numbers and displays ...

Programming - 2. Then it should prompt the user for the input file name of the ...

JAVA PROGRAM SELECTION SORT USING RECURSION - JAVA PROGRAM Details: I'm having a...

Math - In the list of numbers 1,2,3,4,5,6,7,8,9, how many of the numbers in the ...

math 3 grader - Sort these numbers describe your sort rule 5, 10, 16, 19, 24, 37...

math - Sort these numbers. Describe your sort rule. 5 10 16 19 24 37 40

algebra - Sort these numbers describe your sort rule 5, 10, 16, 19, 24, 37, 40

math - Sort these numbers. Describe your sort rule. 5 10 16 19 24 37 40