Why is it significant that the number of times that line 5 is executed is equal to the number of inversions in the original array?

```
1 for each j, from 1 to the length of A – 1
2 temp = A[ j ]
3 i = j – 1
4 while i is greater than -1 and A[ i ] is greater than temp
5 A[ i + 1 ] = A[ i ]
6 i—
7 A[ i + 1] = temp
```
A. It tells us that the time complexity of insertion sort is always O( n ).
B. It can help us to analyze the time complexity of insertion sort, as long as this number can be put in terms of n.
C. It tells us that the time complexity of insertion sort is always O( n2 ).
D. It goes to show how much memory space is conserved with insertion sort.


B

Computer Science & Information Technology

You might also like to view...

_________________ invented the World Wide Web.

a. Marc Andreessen b. Tim O’Reilly c. Tim Berners-Lee d. The Internet Architecture Board (IAB)

Computer Science & Information Technology

Which view of organizations concentrates on myths, metaphors, humor, and ceremonies?

A) culture B) human relationships C) leadership style D) technology

Computer Science & Information Technology

Which fields are listed in the Create Source dialog box are determined by the ________ selected by the user

Fill in the blank(s) with correct word

Computer Science & Information Technology

Using good grammar, explain why technicians must be able to identify common ports

What will be an ideal response?

Computer Science & Information Technology