Question

In: Computer Science

Draw each binary tree that is the maximum heap that results from inserting one by one in the order given the values 20, 15, 25, 30, 45, 18, 10, 12, 16.

In Java-

Draw each binary tree that is the maximum heap that results from inserting one by one in the order given the values 20, 15, 25, 30, 45, 18, 10, 12, 16. Note that your tree diagram should show the heap after the maximum heap property has been restored. Submit nine diagrams.

Next, draw each binary tree that is the maximum heap as each maximum value is deleted from the above tree and after the maximum heap property has been restored. Once again, there will be nine diagrams.

Place both clearly labeled sets of trees into the document mentioned above. You may draw these by hand, scan them, convert the scanned image to a JPEG image, and place that into a document. Do not submit a file that is an image. It must be embedded in a document with your name typed at the top.

Solutions

Expert Solution


Related Solutions

Given the following table: Probability X Y 20% 15% 30% 60% 25% 18% 20% 30% 20%...
Given the following table: Probability X Y 20% 15% 30% 60% 25% 18% 20% 30% 20% Calculate a) the covariance of X and Y, and b) the correlation coefficient. Select one: a. a) -20.64% b) -0.90 b. a) -20.18% b) -0.88 c. a) -17.89% b) -0.78 d. a) -19.20% b) -0.84 e. a) -18.35% b)-0.80
Given the following numbers:   25 16 61 18 15 20 15 20 24 17 19 28,...
Given the following numbers:   25 16 61 18 15 20 15 20 24 17 19 28, derive the mean, median, mode, variance, standard deviation, skewness, kurtosis, range, minimum, maximum, sum, and count. Interpret your results. What is the empirical rule for two standard deviations of the data?
Given the following numbers: 25 16 61 18 15 20 15 20 24 17 19 28,...
Given the following numbers: 25 16 61 18 15 20 15 20 24 17 19 28, derive the mean, median, mode, variance, standard deviation, skewness, kurtosis, range, minimum, maximum, sum, and count. Interpret your results. What is the empirical rule for two standard deviations of the data?
Consider the x, y data: x-data (explanatory variables): 10, 15, 20, 25, 30, 35, 40, 45,...
Consider the x, y data: x-data (explanatory variables): 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100 y-data (response variables): 1359.9265, 1353.3046, 220.7435, 964.6208, 1861.9920, 1195.3707, 1702.0145, 2002.0900, 1129.1860, 1864.5241, 1444.2239, 2342.5453, 2410.9056, 2766.2245, 2135.2241, 3113.7662, 4311.7260, 3313.1042, 4072.0945 Compute a best fit line to the data. Report: a. The slope coefficient, β1:   b. The intercept coefficient, β0:    c. The standard error of the residuals σε:   d. The Adjusted...
Consider the x, y data: x-data (explanatory variables): 10, 15, 20, 25, 30, 35, 40, 45,...
Consider the x, y data: x-data (explanatory variables): 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100 y-data (response variables): 1359.9265, 1353.3046, 220.7435, 964.6208, 1861.9920, 1195.3707, 1702.0145, 2002.0900, 1129.1860, 1864.5241, 1444.2239, 2342.5453, 2410.9056, 2766.2245, 2135.2241, 3113.7662, 4311.7260, 3313.1042, 4072.0945 Compute a best fit line to the data. Report: a. The slope coefficient, β1: ___ b. The intercept coefficient, β0: ___ c. The standard error of the residuals σε: ___ d....
For the stress data given below with the nearest error of 1: 27-17-11-24-36-13-29-22-18 23-30-12-46-17-32-48-11-18 18-32-26-24-38-24-15-13-13 18-21-27-20-16-15-37-19-19...
For the stress data given below with the nearest error of 1: 27-17-11-24-36-13-29-22-18 23-30-12-46-17-32-48-11-18 18-32-26-24-38-24-15-13-13 18-21-27-20-16-15-37-19-19 a) Construct a frequency distribution table. b) Construct the three types of statistical graphs. c) Determine the (1) Mean, (2) Median, (3) Mode, (4) Range, Variance, and (6) Standard Deviation.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT