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
Binary Search Tree
0
votes
112
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)

112
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
(
939
points)

438
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)

670
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
(
57k
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
(
117k
points)

99
views
datastructure
binarysearchtree
bst
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
ECIL Interview Experience
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
All categories
General Aptitude
1.9k
Engineering Mathematics
7.5k
Digital Logic
2.9k
Programming and DS
4.9k
Programming
3.5k
DS
1.3k
Algorithms
4.3k
Theory of Computation
6.2k
Compiler Design
2.1k
Operating System
4.5k
Databases
4.1k
CO and Architecture
3.4k
Computer Networks
4.1k
Non GATE
1.5k
Others
1.5k
Admissions
595
Exam Queries
576
Tier 1 Placement Questions
23
Job Queries
72
Projects
17
Follow @csegate
Recent Blog Comments
@`JEET No brother, I don't have. These points I...
Brother post after $\mathbf 1$ year?
Congratulations :)
Lakshman Patel RJIT Do you have such notes...
Great work sir
50,645
questions
56,565
answers
195,748
comments
101,702
users