Computer Science, asked by rajshriwardhankar212, 2 months ago

Why Binary Search Tree has O(log N) complexity, how is it calculated?

Answers

Answered by llItzDishantll
7

Answer:

It has a very straightforward explanation.

When n grows very large, the log n function will out-grow the time it takes to execute the function.

The size of the "input set", n, is just the length of the list. Simply put, the reason binary search is in O(log n) is that it halves the input set in each iteration.

Answered by itztaesprincessliza
3

Answer:

It has a very straightforward explanation. When n grows very large, the log n function will out-grow the time it takes to execute the function. The size of the "input set", n, is just the length of the list. Simply put, the reason binary search is in O(log n) is that it halves the input set in each iteration.

Similar questions