Chapter 2: Q56J (page 115)
To show the worst case complexity in term of the number of addition and comparison of the algorithm.
Short Answer
The algorithm then makes addition and comparisons. thus, in total additions and comparisons are made while is