~Given the following numbers in array A ...
70 27 44 38 66 52 58 30 18 45
... using the Heap Sort, what is the contents of array A after the heap has been built? Use the definition 'smallest at the top'.
a. 18 27 44 30 45 52 58 70 38 66
b. 18 45 38 70 27 66 58 52 30 44
c. 52 58 66 18 27 30 38 70 45 44
d. 70 27 44 45 52 66 30 18 58 38
e. 27 44 18 30 38 45 58 70 52 66
ANSWER: Here in the below image I have created a min heap and option(A) best suits for this. Here your option is not like correct because at the last it should be 38, 70,66

~Given the following numbers in array A ... 70 27 44 38 66 52 58 30...
In the array A[1..10] that stores the elements [35, 30, 25, 27, 22, 20, 18, 15, 10, 5], Construct a min-heap in the array A. Draw the final heap and show its content in the array A. During the construction of heap, show each step of heap construction. Draw the min-heap after removing the Minimum key from 1) and show its content in the array A From the min-heap in 2), sort the array A in the descending order. Draw...
Write a Java program, In this project, you are going to build a max-heap using array representation. In particular, your program should: • Implement two methods of building a max-heap. o Using sequential insertions (its time complexity: ?(?????), by successively applying the regular add method). o Using the optimal method (its time complexity: ?(?), the “smart” way we learned in class). For both methods, your implementations need to keep track of how many swaps (swapping parent and child) are required...
Write a Java program with a single-dimension array that holds 11 integer numbers and sort the array using a bubble sort. Next, identify the median value of the 11 integers. Here are the steps your program must accomplish. algorithm (either flowchart or pseudocode) that you will use to write the program Step 1. Create an Place the algorithm in a Word document. 6. Ste the Step 2. Code the program in Eclipse and ensure the following steps are accomplished. 1....
Write a C program to assign natural numbers 1 to 100 into a one-dimensional integer array. Display all the values in the array on the screen. For each number in the array, determine if the number contains digit 7 or is divisible by 7. Display all those numbers on the screen. Original array: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27...
Written in Java Your job is to produce a program that sorts a list of numbers in ascending order. Your program will need to read-in, from a file, a list of integers – at which point you should allow the user an option to choose to sort the numbers in ascending order via one of the three Sorting algorithms that we have explored. Your program should use the concept of Polymorphism to provide this sorting feature. As output, you will...
Determine the number of carbons on the molecule using the mas
spectra
43 100 90 80 70 60 50 40 30 39 20 10 74 27 m/z Values and Intensities: 161 38 351 39 21기 40 401 41 6781 42 5781 43 9861 44 45 311 46 Trl 50 101 51 이 52 리 53 1기 54 쾨 55 811 56 691 57 601 58 61 59 411 60 T 71 T1 72 Trl 73 74 16275 253 17 54...
4) Consider the following data: 125 Points] 70 44 36 53 38 48 56 35 46 70 56 53 49 58 70 56 70 51 48 33 38 82 45 70 a) Calculate the sample mean and the median of the above data sct. b) Calculate the five number summary c) Compute the 60s and 90 percentile from the data d) Summarize the data given above using a stem-and-leaf plot.
Problem 7 Given the following keys 16, 27, 52, 38, 10. 67. 56, 32, 4, 71.33, 15. Assume address is calculated by K% 17 l. (6%) Calculate the home addresses of the given keys: (4%)Show the contents of the hash table, using progressive overflow"?lysM) collisions where M 17 2. to resolve 0 10 12 13 6 14 16 (2%) Assuming that every key has the same probability number of accesses to look for a key in the table you built...
Suppose a binary tree data (in tiny written size) is stored in an array (A) as given below and root is placed at “0”index. Note the array indices are in larger written size (0 to 74). Show the traversal data of the given tree for a) In-Order Traversal b) Post Order Traversal A 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 28 13 36 15 9 22 44 7 10 75 33 19 15...
Use C++ (2D Array) Write a program which: 1. Assigns data given below into the 2D array of integers which is 10x10. 2. Prints out the contents of the 2D array after assigning the data to make sure correct data was assigned. 3. Figures out and prints out the square root of the sum of ALL the elements in the 2D array. 4. Figures out and prints out the average of ALL THE ELEMENTS in the 2D array. 5. Figures...