subject

This problem is about the array-based binary heap implementation of a priority queue. let h denote the backing array, i. e h is a binary min-heap array. you should assume that the universe of possible keys is extremely large relative to the size of the heap (i. e., it is not practical to use a position array as described on p. 65 of the ) give an algorithm for a new operation decreasekey(index, delta) that subtracts delta from the key located at the given index in h, and restores the heap ordering. report the time taken by the algorithm.(b) suppose we also want an operation findkey(v) that returns the index of a key k in h (if k appears more than once, then it does not matter which index is returned). describe a modified implementation of the heap in which your findkey(v) operation is o(1), finding the minimum is still o(1), and the operations to insert a key or remove the minimum are still o(log n).

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
question
Computers and Technology, 23.06.2019 05:20
What did creator markus β€œnotch" persson initially call his game
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
You know the right answer?
This problem is about the array-based binary heap implementation of a priority queue. let h denote t...
Questions
Questions on the website: 13722360