Reduced efficiency from O((log n) + 1) to O(log n)