- we can represent path from the root to given node of binary tree by means of binary stringwhere means "go to the left childand means "go to the right child for examplethe path from the root to the node storing ( , in the heap of figure is represented by " design an (log )-time algorithm for finding the last node of complete binary tree with nodesbased on the above representation show how this algorithm can be used in the implementation of complete binary tree by means of linked structure that does not keep reference to the last node - given heap and key kgive an algorithm to compute all the entries in having key less than or equal to for examplegiven the heap of figure and query the algorithm should report the entries with keys and (but not necessarily in this orderyour algorithm should run in time proportional to the number of entries returnedand should not modify the heap - provide justification of the time bounds in table - give an alternative analysis of bottom-up heap construction by showing the following summation is ( )for any positive integer hh / = - suppose two binary treest and hold entries satisfying the heap-order property (but not necessarily the complete binary tree propertydescribe method for combining and into binary tree whose nodes hold the union of the entries in and and also satisfy the heap-order property your algorithm should run in time ( where and are the respective heights of and - implement heappushpop method for the heappriorityqueue classwith semantics akin to that described for the heapq module in section - implement heapreplace method for the heappriorityqueue classwith semantics akin to that described for the heapq module in section - tamarindo airlines wants to give first-class upgrade coupon to their top log frequent flyersbased on the number of miles accumulatedwhere is the total number of the airlinesfrequent flyers the algorithm they currently usewhich runs in ( log ntimesorts the flyers by the number of miles flown and then scans the sorted list to pick the top log flyers describe an algorithm that identifies the top logn flyers in (ntime - explain how the largest elements from an unordered collection of size can be found in time ( log nusing maximum-oriented heap - explain how the largest elements from an unordered collection of size can be found in time ( log kusing (kauxiliary space