First time here? Checkout the FAQ!
+1 vote

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 (75.6k points)   | 420 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.6k points)  
Top Users Feb 2017
  1. Arjun

    5224 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3748 Points

  4. Aboveallplayer

    2986 Points

  5. Debashish Deka

    2356 Points

  6. sriv_shubham

    2298 Points

  7. Smriti012

    2142 Points

  8. Arnabi

    2008 Points

  9. sh!va

    1654 Points

  10. mcjoshi

    1628 Points

Monthly Topper: Rs. 500 gift card

20,832 questions
25,989 answers
22,046 users