binary search vs binary search tree
问题 What is the benefit of a binary search tree over a sorted array with binary search? Just with mathematical analysis I do not see a difference, so I assume there must be a difference in the low-level implementation overhead. Analysis of average case run time is shown below. Sorted array with binary search search: O(log(n)) insertion: O(log(n)) (we run binary search to find where to insert the element) deletion: O(log(n)) (we run binary search to find the element to delete) Binary search tree