Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
binary search space complexity
Aditya Bahuguna
asked
in
Algorithms
Jan 7, 2018
retagged
Jul 18
by
makhdoom ghaya
1,497
views
1
vote
1
vote
binary-search
recursion
space-complexity
test-series
Aditya Bahuguna
asked
in
Algorithms
Jan 7, 2018
retagged
Jul 18
by
makhdoom ghaya
by
Aditya Bahuguna
1.5k
views
answer
comment
Follow
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
0
votes
Ans = C option.
O(logn) because in worst case the height of recursive tree is logn levels!
iarnav
answered
Mar 2, 2018
by
iarnav
comment
Follow
share this
0 Comments
Please
log in
or
register
to add a comment.
← Previous
Next →
← Previous in category
Next in category →
Related questions
1
vote
1
vote
1
answer
1
A_i_$_h
asked
in
Algorithms
Jul 24, 2017
173
views
algorithm
A binary search algorithm is implemented using recurrsion then what is the space and time complexity?
A_i_$_h
asked
in
Algorithms
Jul 24, 2017
by
A_i_$_h
173
views
binary-search
recursion
space-complexity
time-complexity
0
votes
0
votes
2
answers
2
$ourav
asked
in
Algorithms
May 20, 2016
559
views
Time & Space Complexity
Consider the following pseudo code written in C style: bool fun(int arr[],int n,int X) { if(X == 0) return true; if(n == 0 && X !=0) return false; if(arr[n-1]*arr[n-1] > X) return fun(arr, n-1, X); return fun(arr,n-1,X) || ... Time complexity of fun() is O(n2) and it requires O(n) extra space (d) Time complexity of fun() is O(n2) and it requires O(n2) extra space
$ourav
asked
in
Algorithms
May 20, 2016
by
$ourav
559
views
recursion
time-complexity
space-complexity
geeksforgeeks-test-series
4
votes
4
votes
1
answer
3
KISHALAY DAS
asked
in
Algorithms
Oct 19, 2016
781
views
Space Complexity of sorting
KISHALAY DAS
asked
in
Algorithms
Oct 19, 2016
by
KISHALAY DAS
781
views
space-complexity
algorithms
test-series
1
vote
1
vote
1
answer
4
sushmita
asked
in
Programming
Feb 2, 2017
1,469
views
Time complexity to compute the sum of k smallest element in the binary search tree??
Time complexity to compute the sum of k smallest element in the binary search tree?? can we do it like this- Start doing the inorder traversal of the binary search tree, it will give the elements in increasing order. ... which we have got. Its time complexity will be O(h+k). Am i right?? plzz plzz explain someone
sushmita
asked
in
Programming
Feb 2, 2017
by
sushmita
1.5k
views
binary-search
binary-search-tree
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
Life happens, just chill and do hardwork
ISRO RECRUITMENT FOR SCIENTIST B THROUGH GATE
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(648)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(855)
Recent Blog Comments
Maximum age limit changed from 35 yrs. to 28...
Hmm, sir totally getting your point ☺️☺️....
yes, that's fine. But saying so in a public forum...
@gatecse Sir , I know you are correct. I just...
@Deepanshu I have to disagree there...
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy