subject

A min-heap is useful when we are interested in the minimum value of set of numbers. Now, instead of the min, we are interesting in the K-th smallest value. a. Please design a data structure to allow the following two operations: push (insert a new number) and find_Kmin (return the value of the K-th smallest number without removing it). Both operations should be done in O(log K) time.
b. In addition to push and find_Kmin, now we also want to support the pop operation to return and remove the K-th smallest element. Please design a data structure to support these three operations, and each operation should take O(log n) time with n being the size of the current set.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:50
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
question
Computers and Technology, 24.06.2019 10:30
Which of the following types of software is most applicable to the promotion of new products through advertising? a.databases b. spreadsheets c. web design programs d. word processing tools
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
To move an excel worksheet tab, simply right-click on it drag and drop it double-click on it delete it
Answers: 1
question
Computers and Technology, 24.06.2019 21:40
Which of these is not a type of socket? aga (alternating grid array) pga (pin grid array) spga (staggered pin grid array) lga (land grid array)
Answers: 1
You know the right answer?
A min-heap is useful when we are interested in the minimum value of set of numbers. Now, instead of...
Questions
question
Geography, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Chemistry, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Geography, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Geography, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Mathematics, 11.09.2020 06:01
question
Biology, 11.09.2020 06:01
Questions on the website: 13722363