We mentioned in this section that one can check whether all elements of anarray are distinct by a two-part algorithm based on the array’s presorting.
a.If the presorting is done by an algorithm with a time efficiency in ,what will be a time-efficiency class of the entire algorithm?
b.If the sorting algorithm used for presorting needs an extra array of sizen,what will be the space-efficiency class of the entire algorithm?
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.