GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
688 views

The average depth of a binary search tree is

  1. $O(n^{0.5})$
  2. $O(n)$
  3. $O(\log n)$
  4. $O(n \log n)$
asked in DS by Veteran (76.3k points)   | 688 views
Option C
is it same as hight of bst
and worst case of Binary Search Tree is O(n).  #extraInfo

2 Answers

+4 votes
Best answer

The average case depth of a node in a BST is O(lg n)

option C

answered by Loyal (3.1k points)  
selected by
+2 votes

A binary search tree is a binary tree with the further property that, for every node,

 

the value of the element in the left child is less than the value of the element at the node, and

the value of the element in the right child is greater than the value of the element at the node

The average depth over all nodes in a binary search tree is O(lg n) 

answered by Loyal (3.8k points)  


Top Users Apr 2017
  1. akash.dinkar12

    3752 Points

  2. Divya Bharti

    2618 Points

  3. Deepthi_ts

    2162 Points

  4. rude

    1966 Points

  5. Tesla!

    1768 Points

  6. Sanjay Sharma

    1646 Points

  7. Debashish Deka

    1614 Points

  8. Shubham Sharma 2

    1610 Points

  9. Prashant.

    1554 Points

  10. Kapil

    1528 Points

Monthly Topper: Rs. 500 gift card

22,100 questions
28,082 answers
63,368 comments
24,203 users