finish optimal binary search tree