menu
Login
Register
search
Log In
account_circle
Log In
Email or Username
Password
Remember
Log In
Register
I forgot my password
Register
Username
Email
Password
Register
add
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
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
Recent Posts
My GATE Preparation Experience (AIR 6 in GATE CS 2020) and Tips For Future Aspirants
IIT Madras MS in CSE Interview Experience
My GATE Preparation Experience (GATE CS 2020 AIR 188)
Interview Experience at IITM MS CS 2020
IIT Delhi CSE MS(R) Interview Experience- July 2020
Subjects
All categories
General Aptitude
(2k)
Engineering Mathematics
(8.3k)
Digital Logic
(3k)
Programming and DS
(5k)
Programming
(3.6k)
DS
(1.4k)
Algorithms
(4.4k)
Theory of Computation
(6.2k)
Compiler Design
(2.2k)
Operating System
(4.6k)
Databases
(4.2k)
CO and Architecture
(3.5k)
Computer Networks
(4.2k)
Non GATE
(1.2k)
Others
(1.4k)
Admissions
(595)
Exam Queries
(562)
Tier 1 Placement Questions
(23)
Job Queries
(71)
Projects
(19)
Unknown Category
(1k)
Recent Blog Comments
Congrats Aravind :) Don’t just copy...
I started giving full length tests in late...
Bro when did you started giving full length mock...
I think that's a matter of personal preference...
Bro in your text you din't mention about your...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Binary Search Tree
0
votes
211
views
8. What are the worst case and average case complexities of a binary search tree?
a) O(n), O(n)
b) O(logn), O(logn)
c) O(logn), O(n)
d) O(n), O(logn)
data-structures
binary-search-tree
binary-tree
algorithms
asked
Aug 19, 2018
in
Programming
pradeepchaudhary
211
views
answer
comment
0
For which operation? Searching?
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
1
vote
D: Worst case occurs when BST is skewed O(n); Best case occurs when it is Height Balanced O(logn) in case of insertion, search and delete operations
answered
Aug 19, 2018
Shiv Gaur
comment
0
Yes answer would be d
Please
log in
or
register
to add a comment.
← Prev.
Next →
← Prev. Qn. in Sub.
Next Qn. in Sub. →
Related questions
3
votes
3
answers
1
1.4k
views
Binary Search Tree
Suppose we do not have a parent pointer in the nodes of a search tree, only left-child and right-child. Which of the following operations can be computed in time $O(\log n)$ for a balanced search tree? 1- find, insert, delete, but not min, max, pred, succ 2- ... pred, succ 3- find, insert, delete, pred, succ but not min, max 4- All of find, insert, delete, min, max, pred, succ
Suppose we do not have a parent pointer in the nodes of a search tree, only left-child and right-child. Which of the following operations can be computed in time $O(\log n)$ for a balanced search tree? 1- find, insert, delete, but not min, max, pred, succ 2- find, insert, ... not pred, succ 3- find, insert, delete, pred, succ but not min, max 4- All of find, insert, delete, min, max, pred, succ
asked
Aug 23, 2016
in
Algorithms
dd
1.4k
views
binary-search
algorithms
data-structures
binary-search-tree
binary-tree
9
votes
1
answer
2
598
views
Binary Search Tree
Q1. How many binary search trees possible with $11$ distinct key? Q2. How many binary search trees possible with $11$ un-labelled nodes? Q3. How many binary search trees possible with $11$ labelled nodes? Q4. How many binary trees possible with $11$ ... Q5. How many binary trees possible with $11$ un-labelled nodes? Q6. How many binary trees possible with $11$ labelled nodes?
Q1. How many binary search trees possible with $11$ distinct key? Q2. How many binary search trees possible with $11$ un-labelled nodes? Q3. How many binary search trees possible with $11$ labelled nodes? Q4. How many binary trees possible with $11$ distinct key? Q5. How many binary trees possible with $11$ un-labelled nodes? Q6. How many binary trees possible with $11$ labelled nodes?
asked
Feb 2, 2018
in
DS
Lakshman Patel RJIT
598
views
data-structures
binary-search-tree
binary-tree
2
votes
4
answers
3
1.1k
views
How many Binary Search Trees are possible for a labelled nodes?
Let us there are n nodes which are labelled. Then the number of trees possible is given by the Catalan Number i.e $\binom{2n}{n} / (n+1)$ Then the binary search trees possible is just 1?
Let us there are n nodes which are labelled. Then the number of trees possible is given by the Catalan Number i.e $\binom{2n}{n} / (n+1)$ Then the binary search trees possible is just 1?
asked
Jan 16, 2019
in
DS
sripo
1.1k
views
algorithms
graph-theory
binary-search-tree
binary-search
binary-tree
trees
data-structures
2
votes
1
answer
4
196
views
Binary Tree
I have doubt when its asked to know number of labelled and unlabelled binary tree : For labelled = (On basis of labelling) T(n) = 2nCn/(n+1) * n! For unlabelled = (On Basis of Geometric Sturucture) T(n) = (2n)Cn/n+1 Right? What if its Asked for BST what will be the answer in both the above cases and Why?
I have doubt when its asked to know number of labelled and unlabelled binary tree : For labelled = (On basis of labelling) T(n) = 2nCn/(n+1) * n! For unlabelled = (On Basis of Geometric Sturucture) T(n) = (2n)Cn/n+1 Right? What if its Asked for BST what will be the answer in both the above cases and Why?
asked
Feb 17, 2018
in
Algorithms
Na462
196
views
data-structures
binary-tree
binary-search-tree
algorithms
...