Question discussion

A file has 10,000 records and a block holds 20 records. In the worst case, how many block accesses does a binary search on the sorted file…

1124Medium DSSSB TGT Computer Science 0 replies

A file has 10,000 records and a block holds 20 records. In the worst case, how many block accesses does a binary search on the sorted file need?

  • A9
  • B8
  • C10
  • D500
Correct answer: A

Explanation

The file occupies 500 blocks and ⌈log₂ 500⌉ = 9 block accesses are needed in the worst case.

Discussion 0

Nobody has replied yet. Start the discussion!