Question: Algorithms and Data Structures Question on min-heap. 2. (10 points.) Suppose that A is an array whose integer elements are organized into a min-heap. Also
Algorithms and Data Structures Question on min-heap.

2. (10 points.) Suppose that A is an array whose integer elements are organized into a min-heap. Also suppose that e is an integer. Write a procedure IN-MIN-HEAP(A, e) that returns TRUE if e is an element of A, and returns FALSE otherwise. Your procedure must not change A, and it must not copy A. It must avoid visiting all elements of A if possible, so it must not use linear search. You may use one or more "helper procedures
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
