Question: Easy Computer Science merge algorithm question This problem considers the polyphase merge algorithm for external sorting as pre- sented in the lectures and in the

Easy Computer Science merge algorithm question

  1. This problem considers the polyphase merge algorithm for external sorting as pre- sented in the lectures and in the lecture notes. Suppose we run this algorithm on the following input:

    [58, 76, 97, 18, 34, 25, 89, 82, 77, 64, 16, 15, 87, 56, 46, 67, 91, 17, 62, 48, 30]

    Assume that the number of items that we can hold in memory at one time is 4. (This parameter was called m in the lecture and the class notes.)

    1. (a) How many runs are created in Phase 1 if we run the simple version that does not use replacement selection? List the contents of each run.

    2. (b) How many runs are created in Phase 1 if we use replacement selection? List the contents of each run.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!