GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
1.1k 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 (77.8k points)   | 1.1k views
Option C
is it same as hight of bst
and worst case of Binary Search Tree is O(n).  #extraInfo

2 Answers

+5 votes
Best answer

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

option C

answered by Loyal (3.2k points)  
selected by
+3 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 (4k points)  


Top Users Jun 2017
  1. Bikram

    3704 Points

  2. Hemant Parihar

    1484 Points

  3. junaid ahmad

    1432 Points

  4. Arnab Bhadra

    1408 Points

  5. Niraj Singh 2

    1311 Points

  6. Rupendra Choudhary

    1194 Points

  7. rahul sharma 5

    1148 Points

  8. Debashish Deka

    1112 Points

  9. srestha

    932 Points

  10. Arjun

    930 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 19 - 25
  1. Bikram

    1960 Points

  2. Niraj Singh 2

    1306 Points

  3. junaid ahmad

    502 Points

  4. sudsho

    410 Points

  5. akankshadewangan24

    392 Points


23,361 questions
30,068 answers
67,376 comments
28,385 users