Design and implement an algorithm that constructs a Treap from a sorted array, a, of n elements. This method should run in O(n)worst-case time and should construct a Treap that is indistinguishable from one in which the elements of a were added one at a time using the add(x) method. Please see the attached sample file below.
Cheap Essay essays are NOT intended to be forwarded as finalized work as it is only strictly meant to be used for research and study purposes. Cheap Essay does not endorse or condone any type of plagiarism.