subject
Engineering, 06.04.2020 21:52 dennisedemirovic20

For this question, we will use the heap-supporting functions as seen in the lecture slides as building blocks for this assignment to build a new heap implementation. The heap implementation shown in the lecture slides is an example of a min-heap, in which the smallest element is at the root and an elements in child trees are larger than the value at the root. We can also construct max heap data structures in which the largest element in the heap is at the root and all elements in child trees are smaller than the root

The objective is to define SCHEME functions to manipulate a heap which
1. maintain a binary tree as a heap,
2. use a generic (first order) order relation
3. provides functions which can determine if a heap is empty as well as heap. insert heap-renove and combine-heaps

Define a SCHEME function, named (heap-remove f H) which takes two arguments, a heap and a firstorder relation, a heap containing the elements of H with the root value removed. Note, heap-remove

ansver
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 14:10, kayabwaller4589
When at a point two solid phase changes to one solid phase on cooling then it is known as a) eutectoid point b) eutectic point c) peritectic point d) peritectoid point
Answers: 3
image
Engineering, 03.07.2019 15:10, theamandawhite
Ahouse has the following electrical appliance usage (1) single 40w lamp used for 4 hours per day (2) single 60w fan used for 12 hours per day (3) single 200w refrigerator that runs 24 hours per day with compressor run 12 hours and off 12 hours find the solar power inverter size in watt with correction factor of 1.25.
Answers: 1
image
Engineering, 04.07.2019 18:10, keigleyhannah30
Aplate clutch has a single pair of mating friction surfaces 250-mm od by 175-mm id. the mean value of the coefficient of friction is 0.30, and the actuating force is 4 kn. a) find the maximum pressure and the torque capacity using the uniform-wear model. b) find the maximum pressure and the torque capacity using the uniform-pressure model.
Answers: 3
image
Engineering, 04.07.2019 18:10, ijohnh14
Shafts are machine elements that are used to a) carry axial loads b) direct shear loads c) transmit power d) rotate at constant speed e) none of the above circular and square shafts subjected to the same torque under the same circum behave a) the same way b) almost the same way
Answers: 2
You know the right answer?
For this question, we will use the heap-supporting functions as seen in the lecture slides as buildi...

Questions in other subjects:

Konu
Mathematics, 15.12.2019 14:31