in Databases
905 views
2 votes
2 votes

External sorting is used to sort large files of records. It uses a sort-merge strategy which splits large files to smaller blocks and sorts them and merges the sorted runs. Consider a file of 2048 blocks which is to be sorted with available buffer space of 32 blocks in main memory. The total number of block access is

a)12288

b)10224

c)14446

d)18246

in Databases
by
905 views

2 Comments

i assume block access here is time complexity of sorting the blocks, and plug the values in the formulae := n*k*(lgk)

here n=32 blocks and k=64(number of divisions of file to fit in memory ie, 2048/32)

this results in:= 32*64*(lg64)=12,288 (is it right!?)

*reference := https://www.geeksforgeeks.org/merge-k-sorted-arrays/

0
0
Yes, it is right
0
0

Please log in or register to answer this question.

Related questions