Index calculations for balanced binary search trees in in-order layout