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
-
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.)
-
(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.
-
(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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started