Answer:
sdsdsd
Explanation:
Given: A is an array of length n objects that has at most k distinct keys in it.
To find: sorted B array that has k distinct keys in A.
Algorithm:
Sort_array(n)
{
Iterate through n elements of your list and remove duplicate values from it. In python you
can do this operation by set function with O(n) complexity
unique_A = set (A)
Then sort this unique array in python by sorted function with O(nlogn) complexity
sorted_B = sorted (unique_A)
}