treeIndexing.initJSAV() treeIndexing.diskAccesses

Starting at the root of the binary search tree, determine how many disk accesses are required to reach the selected (highlighted) node.

Assumptions:
1) Same color nodes are in the same disk block.
2) Consecutive reads from the same color block only count as one disk access.
3) Consider only the direct path from the root to the selected node.
4) There are no buffers. Every new block read has to be read from disk and never from memory.

answer

Accessing the root node always takes one disk access.

Consecutively reading from same-color blocks counts as one disk access.

Don't forget to include the disk access for the last node (selected node) if the color is different from the parent node.