Chapter 8: Q56E (page 513)
To show the worst case complexity in term of the number of addition and comparison of the algorithm.
Short Answer
The algorithm then makes \(n - 1\) addition and \(n - 1\) comparisons. \(n - 1 + n - 1 = 2n - 2\), thus, in total \(2n - 2\) additions and comparisons are made while \(2n - 2\) is \(O(n)\).