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
Recent questions tagged space-complexity
0
votes
1
answer
31
Dynamic programing
How to find space complexity of fibbo series ..
air1ankit
asked
in
Algorithms
Mar 23, 2017
by
air1ankit
2.2k
views
algorithms
space-complexity
normal
2
votes
1
answer
32
Gatebook_Mocktest2(DS)
The intended purpose of this code is to precompute all the primes less than N. When it is finished executing, for r ∈ [2, N), bits[r] is supposed to equal 1 if and only if N is composite. Assume that the bits array is initialized to all zeroes. for ( int x = 2; x < N ... a natural number n < N is prime. (A) I only (B) I and II only (C) II and III only (D) I, II, and III
smartmeet
asked
in
DS
Feb 8, 2017
by
smartmeet
387
views
gatebook-mt2
data-structures
space-complexity
time-complexity
asymptotic-notations
0
votes
0
answers
33
GateBook Mock Test_2(Algorithms)
The intended purpose of this code is to precompute all the primes less than N. When it is finished executing, for r ∈ [2, N), bits[r] is supposed to equal 1 if and only if N is composite. Assume that the bits array is initialized to all zeroes. for ( int x = 2; x ... number n < N is prime. (A) I only (B) I and II only (C) II and III only (D) I, II, and III
smartmeet
asked
in
Algorithms
Feb 7, 2017
by
smartmeet
306
views
gatebook-mt2
data-structures
algorithms
space-complexity
time-complexity
1
vote
1
answer
34
Space complexity
Which of the following algorithm have the smallest memory requirement i.e Low space complexity including data space and run time stack for recursive calls. A)insertion sort B)quick sort C)merge sort D)selection sort
reena_kandari
asked
in
Programming
Feb 5, 2017
by
reena_kandari
1.4k
views
algorithms
space-complexity
sorting
3
votes
1
answer
35
Project Euler Problem 1
What is the Time and Space Complexity of Both the Codes ? Are both O(1)? If so why? And then how is the second more efficient? Below is the code in Brute Force for(i=0;i<1000;i++) { if(i%3==0 || i%5==0) { sum+=i; } } This is Using Summation int P1(int n) { int t,x,f; t=(n-1)/3; x=(n-1)/5; f=(n-1)/15; return((3*t*(t+1)/2) + (5*x*(x+1)/2) - (15*f*(f+1)/2)); }
sripo
asked
in
Algorithms
Jan 28, 2017
by
sripo
247
views
algorithms
time-complexity
space-complexity
0
votes
3
answers
36
number of record movement
iita
asked
in
Algorithms
Dec 31, 2016
by
iita
185
views
algorithms
graph-algorithms
space-complexity
test-series
1
vote
3
answers
37
SPACE COMPLEXITY
santhoshdevulapally
asked
in
Algorithms
Dec 15, 2016
by
santhoshdevulapally
461
views
space-complexity
sorting
ace-test-series
0
votes
0
answers
38
Algorithms [Euclid's Algorithm for GCD]
What is the best case and worst case time complexity for Euclid's algorithm?Let numbers be a and b As per my understanding Best case - If a and b are multiple :0(1). Worst case - Both are consecutive fibonicci number.Complexity?
rahul sharma 5
asked
in
Algorithms
Dec 8, 2016
by
rahul sharma 5
604
views
algorithms
space-complexity
9
votes
2
answers
39
Space complexity of heap sort
Why space complexity of heapsort is O(1)....and why not O(logn)..because of space required by recursion calls which is equivalent to height of the tree...where am i getting wrong plz help...
vineet.ildm
asked
in
Algorithms
Nov 7, 2016
by
vineet.ildm
4.8k
views
algorithms
time-complexity
space-complexity
sorting
heap
4
votes
1
answer
40
Space Complexity of sorting
KISHALAY DAS
asked
in
Algorithms
Oct 19, 2016
by
KISHALAY DAS
781
views
space-complexity
algorithms
test-series
0
votes
1
answer
41
BFS Theory
1. Does space complexity includes both input space and extra space needed for algorithm or only extra space? 2.What will be Space complexity for BFS algorithm with adjacency matrix representation? Please reply with supporting references.
Shyam Singh 1
asked
in
Algorithms
Oct 12, 2016
by
Shyam Singh 1
621
views
space-complexity
breadth-first-search
1
vote
1
answer
42
Sorting
Consider the problem of adding two n-bit binary integers, stored in two n-element arrays A and B. The sum of the two integers should be stored in binary form in an (n+1)-element array C.What is the time and space complexity of it. I think O(n) and O(1).PLz explain
Atul Verma12
asked
in
Algorithms
Sep 23, 2016
by
Atul Verma12
346
views
sorting
time-complexity
space-complexity
0
votes
1
answer
43
Online Question from a test
Which of the following algorithm has the smallest memory requirement, including data space and run time stack for recursive calls? A. Insertion Sort B. Quick Sort C. Selection Sort D. Merge Sort
parulnabi
asked
in
Algorithms
Sep 2, 2016
by
parulnabi
424
views
space-complexity
sorting
algorithms
test-series
1
vote
0
answers
44
Space complexity
What is the best way to find the space complexity of a particular function ?
gate-17
asked
in
Algorithms
Aug 14, 2016
by
gate-17
231
views
algorithms
space-complexity
descriptive
2
votes
3
answers
45
UGC NET CSE | December 2015 | Part 2 | Question: 39
An ideal sort is an in-place-sort whose additional space requirement is O (log$_2$ n) O (nlog$_2$ n) O (1) O (n)
go_editor
asked
in
Algorithms
Aug 8, 2016
by
go_editor
1.8k
views
ugcnetcse-dec2015-paper2
algorithms
sorting
space-complexity
0
votes
2
answers
46
Find the Space complexity of following Code [Ace Gate Practice Booklet Vol-1 Page 127]
Find the time and Space complexity of code below : void fun(n) { if (n==1) then call A(); else { fun(n/2); fun(n/2); call B(n); } } Please note that B(n) takes O(n) time and A(n) takes O(1) time respectively. ... above code would be : $T(n) = 2T(n/2)+O(n)$ which is $O(nlog(n))$ But What will be space complexity ?
APOORV PANSE
asked
in
Algorithms
Jun 2, 2016
by
APOORV PANSE
1.6k
views
space-complexity
algorithms
ace-booklet
0
votes
2
answers
47
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
0
votes
1
answer
48
space complexity
what is the stack space required by the given function gate(n) { if(n!=0) return gate(n-1); else printf("gate2016"); }
Pranav Gupta 1
asked
in
Algorithms
Jan 18, 2016
by
Pranav Gupta 1
719
views
stack
space-complexity
algorithms
functions
48
votes
5
answers
49
GATE CSE 2005 | Question: 81a
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } The space complexity of the above code is? $O(1)$ $O(n)$ $O(n!)$ $n^n$
Kathleen
asked
in
Algorithms
Sep 22, 2014
by
Kathleen
15.4k
views
gatecse-2005
algorithms
recursion
normal
space-complexity
5
votes
1
answer
50
What is the time complexity?
double foo(int n) { int i; double sum; if(n == 0) { return 1.0; } else { sum = 0.0; for(i = 0; i < n; i++) { sum += foo(i); } return sum; } } The time complexity of the above code is?
Arjun
asked
in
Algorithms
Aug 29, 2014
by
Arjun
2.0k
views
time-complexity
space-complexity
algorithms
normal
Page:
« prev
1
2
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 questions tagged space-complexity
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...