Answer :
Answer:
Upper bound means the algorithm will not use more time than this.
Since there n sorted sequence and having n distinct keys, the upper bound will be :
O(n^2logn) using Min Heap, n^2 because there will be the output of array size n*n
Explanation: