Data Structures, Algorithms, & Applications in Java
Chapter 2, Exercise 27
Let, n be the number of elements in the array
(i.e.,
n= a.length).
When n < 1, the number of comparisons is zero.
When n >= 1,
the best-case number of comparisons is one and the worst-case number is
n.