Time Complexity of Binary Search or Similar Recursive Tree

Binary tree is a special case where a problem of size n is divided into sub-problem of size n/2. Let me show you how to calculate the height of tree in which a problem is divided into subproblems of size b until we recursively reach a problem of size 1.

Binary Search Tree Recursive Relation = T(n/2) + O(1)

If you feel like thanking just follow me on Twitter

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s