Math Problem Statement

How many key comparisons does insertion sort make to sort a list of 20 items if the list is given in reverse order?

Solution

Ask a new question for Free

By Image

Drop file here or Click Here to upload

Math Problem Analysis

Mathematical Concepts

Algorithms
Sorting
Combinatorics

Formulas

Sum of first (n-1) natural numbers: C(n) = (n-1) * n / 2

Theorems

-

Suitable Grade Level

Grades 10-12