140k views
2 votes
Assume (for simplicity in this exercise) that only one tuple fits in a block and memory holds at most three blocks. Show the runs created on each pass of the sort-merge algorithm when applied to sort the following tuples on the first attribute: (kangaroo, 17), (wallaby, 21), (emu, 1), (wombat, 13), (platypus, 3), (lion, 8), (warthog, 4), (zebra, 11), (meerkat, 6), (hyena, 9), (hornbill, 2), (baboon, 12).

User Pepero
by
5.4k points

1 Answer

5 votes

Answer:

See explaination

Step-by-step explanation:

Let's define tuple as an immutable list of Python objects which means it can not be changed in any way once it has been created.

Take a look at the attached file for a further detailed and step by step solution of the given problem.

Assume (for simplicity in this exercise) that only one tuple fits in a block and memory-example-1
User Matt Habel
by
5.2k points