GATE CSE
First time here? Checkout the FAQ!
x
+3 votes
1.2k 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 (92.5k points) 972 2329 3115 | 1.2k 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.3k points) 3 9 29
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 (4.1k points) 7 22 75
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23398 Points

  2. Bikram

    17078 Points

  3. Habibkhan

    8280 Points

  4. srestha

    6300 Points

  5. Debashish Deka

    5438 Points

  6. jothee

    4978 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4352 Points

  9. sushmita

    3970 Points

  10. Rishi yadav

    3804 Points


Recent Badges

Popular Question sh!va
Popular Question sh!va
Regular Rishabh Gupta 2
Popular Question Sunil8860
Reader Rajesh Veeranki 2
Notable Question rahul sharma 5
Commentator Shivam Chauhan
Notable Question set2018
Nice Comment srestha
Notable Question set2018
27,325 questions
35,177 answers
84,123 comments
33,280 users