The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Binary Search Tree
0
votes
107
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)
datastructure
binarysearchtree
bst
binarytree
algorithms
asked
Aug 19, 2018
in
Programming
by
pradeepchaudhary
Active
(
1.2k
points)

107
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
by
Shiv Gaur
Active
(
1.6k
points)
comment
0
Yes answer would be d
Please
log in
or
register
to add a comment.
← Prev. Qn. in Sub.
Next Qn. in Sub. →
← Prev.
Next →
Related questions
0
votes
1
answer
1
Binary Tree construction
Given the preorder/postorder and inorder traversal of a binary tree, we can always construct a unique binary tree (I think so, correct me if I am wrong) Construct a binary tree with the nodes A, B, C such that its preorder traversal is ABC and its inorder traversal is CAB.
asked
Nov 8, 2017
in
DS
by
humblefool
Junior
(
933
points)

428
views
datastructure
algorithms
bst
binarytree
treetraversal
binarysearchtree
+3
votes
2
answers
2
Binary Search tree
Consider an array with ‘n’ numbers, let “T” be time complexity for finding a number appeared maximum number of times in an array. Using Binary Search Tree data structure the T will be A. O(log n) B. O(n) C. O(n logn) D. O(n2)
asked
Jan 11, 2017
in
Algorithms
by
Nithish
Active
(
1.5k
points)

665
views
algorithms
binarysearchtree
datastructure
bst
+2
votes
3
answers
3
Binary Search Tree
Suppose we do not have a parent pointer in the nodes of a search tree, only leftchild and rightchild. 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
asked
Aug 23, 2016
in
Algorithms
by
dd
Veteran
(
56.8k
points)

1.1k
views
binarysearch
algorithms
datastructure
bst
binarytree
+1
vote
1
answer
4
Binary Search Tree
1) How many ways we can traverse 1,2,3,4 in BST? 2) How many ways we can insert 1,2,3,4 in BST? ______________________________________________________________________ How both are different in calculation of BST?Why they are use different formula?
asked
Aug 18, 2018
in
DS
by
srestha
Veteran
(
116k
points)

95
views
datastructure
binarysearchtree
bst
+2
votes
1
answer
5
Binary Search Tree
Number of ways we can insert 5,6,9,10 in the nodes of BST, such that height of BST is either 2 or 3?
asked
Aug 17, 2018
in
DS
by
srestha
Veteran
(
116k
points)

192
views
datastructure
bst
binarysearchtree
+8
votes
1
answer
6
Binary Search Tree
Q1. How many binary search trees possible with $11$ distinct key? Q2. How many binary search trees possible with $11$ unlabelled 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$ unlabelled nodes? Q6. How many binary trees possible with $11$ labelled nodes?
asked
Feb 2, 2018
in
DS
by
Lakshman Patel RJIT
Veteran
(
51.1k
points)

462
views
datastructure
binarysearchtree
binarytree
+2
votes
1
answer
7
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?
asked
Jan 16
in
DS
by
sripo
Active
(
2.3k
points)

374
views
algorithms
graphtheory
binarysearchtree
binarysearch
binarytree
trees
datastructure
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
Resource to Learn Graph Theory Interactively
Recruitment to the post of Scientist/Engineer 'SC' (Electronics, Mechanical and Computer Science)
Standard Videos for Calculus
Standard Videos for Linear Algebra
Standard Videos for Graph Theory
All categories
General Aptitude
1.8k
Engineering Mathematics
7.3k
Digital Logic
2.9k
Programming and DS
4.9k
Programming
3.5k
DS
1.3k
Algorithms
4.4k
Theory of Computation
6.1k
Compiler Design
2.1k
Operating System
4.2k
Databases
4.1k
CO and Architecture
3.4k
Computer Networks
4.1k
Non GATE
1.6k
Others
1.8k
Admissions
595
Exam Queries
576
Tier 1 Placement Questions
23
Job Queries
72
Projects
17
Follow @csegate
Recent Blog Comments
It takes some time to update.
I have done the payment but when I check payment...
Awesome!
Yes sir the pdf is not yet given , lease provide...
Is Go book still available in Rs 1600 .I want to...
50,339
questions
55,765
answers
192,354
comments
90,815
users