logo

Crowdly

The off-line minimum problem asks us to maintain a dynamic set T of elements f...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

The off-line minimum problem asks us to maintain a dynamic set T of elements from the domain {1; 2; ... ; n} under the operations INSERT and EXTRACT-MIN. We are given a sequence S of n INSERT and m EXTRACT-MIN calls, where each key in {1; 2; ... ; n} is inserted exactly once. We wish to determine which key is returned by each EXTRACTMIN call. Specifically, we wish to fill in an array extracted[1..m], where for i = 1; 2; ... ; m; extracted[i] is the key returned by the ith EXTRACT-MIN call. The problem is ”off-line” in the sense that we are allowed to process the entire sequence S before determining any of the returned keys a. In the following instance of the off-line minimum problem, each INSERT is represented by a number and each EXTRACT-MIN is represented by the letter E:

3, E, 7, 1, 4, E, E, 5, 2, 8, E, 6, E, 9, E, 15.

Fill in the correct values in the extracted array with the following format: 1, 2, 3, ... (no punctuation at the end)

More questions like this

Want instant access to all verified answers on moodle.concordia.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!