Question

(a) Consider an initially empty max-heap, where the following keys are to be inserted one at...

(a) Consider an initially empty max-heap, where the following keys are to be inserted one at a time: 11, 19, 23, 12, 13, 17, 13, 14, 18, and 33. Draw the tree that results after building this max-heap.

(b) Show the result of inserting 10, 12, 1, 14, 6, 5, 8, 15, 3, 9, 7, 4, 11, 13, and 2, one at a time and in the giver order , into an initially empty binary min heap.

(c) Show the result of performing three deleteMin operations in the heap of the previous binary min heap.

Homework Answers

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Construct the binary max-heap for the keys given below. Once all the keys are inserted, perform...
Construct the binary max-heap for the keys given below. Once all the keys are inserted, perform the remove maximum operation and then display the binary heap in the array form Keys to insert: 6, 7, 12, 10, 15, 17, 5, 9, 11
(Data Structure) Suppose we want to store the data of a binary heap in an array....
(Data Structure) Suppose we want to store the data of a binary heap in an array. Show the data of that array after inserting the given keys one by one. Assume that initially binary heap is empty. Show all steps of insertions. Note: No need to show the changes for each step of “percolate up”. The contents of the array must be shown after completing one insertion. Create the “Min Heap” for the following data set 7,      3,      18,    -9,    ...
1.Consider a hard drive with an average seek time of 9 ms. Its disk spins at...
1.Consider a hard drive with an average seek time of 9 ms. Its disk spins at 7200 rpm. What’s the average access time? In your answer, ignore the drive transfer time and any controller overhead. 2.Suppose that we are using extendable hashing on a file that contains records with the following search-key values: (2, 3, 5, 7, 11, 17, 19, 23, 29, 31). Show the final extendable hash structure for this file if the hash function is h(x) = x...
(1) Hong Kong, where people crowd into tiny living spaces, is one of the most densely...
(1) Hong Kong, where people crowd into tiny living spaces, is one of the most densely populated places on Earth, some with only a bed, a hot plate, and a toilet. (2) The city is made up of more than 200 islands, and there is no more available land to house its people. (3) Officials have proposed a radical solution: creating a whole new island. (4) The East Lantau Metropolis would be built on land reclaimed from the sea and...
The price of a share of stock divided by the company's estimated future earnings per share...
The price of a share of stock divided by the company's estimated future earnings per share is called the P/E ratio. High P/E ratios usually indicate "growth" stocks, or maybe stocks that are simply overpriced. Low P/E ratios indicate "value" stocks or bargain stocks. A random sample of 51 of the largest companies in the United States gave the following P/E ratios†. 11 35 19 13 15 21 40 18 60 72 9 20 29 53 16 26 21 14...
6. An investment banking firm was considering two spreadsheet software for possible use in its large...
6. An investment banking firm was considering two spreadsheet software for possible use in its large data analysis operations. A sample of 20 typical analysis problems were carried out using both software on the firm’s standard personal computer. The time in minutes needed to load the data, program the spreadsheet calculations, carry out the analysis, and print the results was recorded for each problem for each software. The data for software A are stored in column 1 of the Excel...
3.   Consider the following data set for an office structure built by Anderson Construction Co. The...
3.   Consider the following data set for an office structure built by Anderson Construction Co. The completed building is nine stories. However, construction was interrupted by a fire after 5.3357 floors were completed. At the time of the fire, Anderson had used 54,067 hours of labor to construct the first 5.3357 stories of the building. It then took Anderson an additional 40,750 labor hours to complete this nine-story building. In this problem, FLRCOM is the number of floors completed, and...
TODO 1: Constructor. It assigns the songList member variable to a new instance of an ArrayList...
TODO 1: Constructor. It assigns the songList member variable to a new instance of an ArrayList that stores Song objects.. TODO 2: Implement the isEmpty method. Takes no parameters. Returns true if there are no songs on the list, false otherwise. TODO 3: Implement the addSong method. This method takes a Song object as a parameter and does not return a value. It adds the song to the songList. TODO 4: Implement the getSongListAsString method. This method takes no parameters....
NWS620S Tutorial 1: Symmetric Encryption - DES Encryption is the translation of data into a secret...
NWS620S Tutorial 1: Symmetric Encryption - DES Encryption is the translation of data into a secret code so that only authorised entities can read it. Encrypting data is considered a very effective way of achieving data security. To access encrypted data, you must have access to a secret key that enables you to decrypt it. Unencrypted data is called plain text; encrypted data is referred to as cipher text. There are two types of encryption: • Symmetric encryption • Asymmetric...
QUESTION 1 Which one of the following would NOT be necessary for an offer to have...
QUESTION 1 Which one of the following would NOT be necessary for an offer to have legal standing? A. The language must reflect the intent to become a party to a contract. B. All of the conditions under which the offer would be terminated must be identified. C. All the significant terms and/or conditions must be contained in the offer. D. The offer must be effectively communicated to the other party. 3 points    QUESTION 2 Which one of the...