The insertion sort algorithm is an example of an algorithm in which of the following classes?
A. (lg n)
B. (n)
C. (n lg n)
D. ( n2 )
Answer:D
The insertion sort algorithm is an example of an algorithm in which of the following classes?
A. (lg n) B. (n) C. (n lg n) D. ( n2 )