Suppose Network Connection High Number Integers Sent Bob Bob Wishes Keep Track Minimum Amo Q43858444
Suppose that, over a network connection, a very high number of integers is being sent to Bob. Bob wishes to keep track of the minimum among all integers he has seen so far, so he stores each integer in a binary min heap (like what you saw during discussion section). Then, whenever Bob wishes to check the current minimum, he simply checks the value at the root of the heap. Is this an ideal online algorithm? If not, then explain how to make the algorithm ideal? If it is already ideal, then explain why Bob cannot make a better online algorithm? Show transcribed image text Suppose that, over a network connection, a very high number of integers is being sent to Bob. Bob wishes to keep track of the minimum among all integers he has seen so far, so he stores each integer in a binary min heap (like what you saw during discussion section). Then, whenever Bob wishes to check the current minimum, he simply checks the value at the root of the heap. Is this an ideal online algorithm? If not, then explain how to make the algorithm ideal? If it is already ideal, then explain why Bob cannot make a better online algorithm?
Expert Answer
Answer to Suppose that, over a network connection, a very high number of integers is being sent to Bob. Bob wishes to keep track o…
OR