Friday

April 25, 2014

April 25, 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!

**Related Questions**

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

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

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

java programming - You need to provide more than a yes or no answer for this ...

algebra 1 - You work in the local mailroom at a college. One of your duties is ...

Algebra 1 - You work in the local mailroom at a college. One of your duties is ...

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

math - sort these numbers 5 10 16 19 24 37 40. describe sort rule

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