SOLUTION
The algorithm makes 2 comparison in each iteration of the while-loop and makes 1 additional comparisons for each iteration of the for-loop.
The number of iterations of the while-loop is the number of times we divide the sub list of k integers into 2 lists. If, then this means that the while-loop hasiterations. If, then the while-loop has iterations. Since when is an integer, there are iterations of the while-loop.
The number of comparisons is the product of the number of iterations and the number of comparisons per iteration.
Number of comparisons in while-loop
Thus at most comparisons are made and is .