how to calculate binary search complexity
Here a more mathematical way of seeing it, though not really complicated. IMO much clearer as informal ones: The question is, how many times can you divide N by 2 until you have 1? This is essentially saying, do a binary search (half the elements) until you found it. In a formula this would be … Read more