Consider the procedure mystery which takes as inputs a vector A and a positive integer k such that all elements of A are between 0 and k, both included.
Requried:
a. What is the content of B at the end of the execution of mystery?
b. If n is the length of the vector A and you are guaranteed that k = O(n), what is the asymptotic cost of mystery as a function of n?