Average successful search in a perfect binary search tree

ID: average-successful-search-in-a-perfect-binary-search-tree

For distinct keys and a uniformly chosen present target, early-return binary search takes mean iterations. There are targets needing probes, so sum over depths zero through and divide by . A boundary search that always closes the interval takes exactly iterations. Their expected difference is , even though an individual shallow target can save many probes.

New to topics? Read the docs here!