Therangeof a finite nonempty set ofnreal numbersSis defined as the differ-ence between the largest and smallest elements of S.For each representationofSgiven below, describe in English an algorithm to compute the range. Indi-cate the time efficiency classes of these algorithms using the most appropriatenotation
a.An unsorted array
b.A sorted array
c.A sorted singly linked list
d.A binary search tree
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'.