![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 10.03.2020 02:12 jermainedwards
You are given a min-heap containing n data items, along with a data item x and a positive integer k. Your task is to design an algorithm that runs in time O(k) and answers the following question: are there at least k items in the heap that are less than x?
Of course, you could go through the entire heap and just count the number of items that are less than x, but this would take time proportional to n. The challenge is to design an algorithm whose running time is O(k) by somehow using the heap property.
![ansver](/tpl/images/cats/User.png)
Answers: 3
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 05:00
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
You know the right answer?
You are given a min-heap containing n data items, along with a data item x and a positive integer k....
Questions
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/es.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 19:30
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 19:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 19:30
![question](/tpl/images/cats/mat.png)