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
3
answers
1
Self doubt.
What is the time & space complexity of this algorithm? Main() { for(i=n; i>10; i=i^1/4) { for(j=201; j<n^3; j=j+400) { for(k=47; k<=n^84; k=k*108) { k=k^61; } } } }
Nisha Bharti
asked
in
Algorithms
Sep 26
by
Nisha Bharti
92
views
algorithms
time-complexity
space-complexity
self-doubt
0
votes
0
answers
2
Capgemini Mock Test 2023
int sum(int A[], int n) { int sum = 0, i; for(i = 0; i< n; i++) sum = sum + A[i]; return sum; } What is the space complexity? Select one: a. 2n + 8 b. 2n + 16 c. n^2 d. n + 8 What is the space complexity?
chokostar
asked
in
Programming
Aug 24
by
chokostar
107
views
space-complexity
0
votes
0
answers
3
Best Open Video Playlist for Asymptotic Worst-Case Time and Space Complexity Topic | Algorithm
Please list out the best free available video playlist for Asymptotic Worst-Case Time and Space Complexity from Algorithm as an answer here (only one playlist per answer). We'll then select the best playlist ... are more likely to be selected as best. For the full list of selected videos please see here
makhdoom ghaya
asked
in
Study Resources
Aug 18
by
makhdoom ghaya
50
views
go-classroom
video-links
missing-videos
free-videos
asymptotic-notations
time-complexity
space-complexity
1
vote
0
answers
4
Time Complexity for an infinite loop
What is the time complexity for infinite loops Question 1 what is T(n) for this case While(1) { a=a+b; } Question 2 for this case if(1) { for i to n a=a+b } else { for i to n for j to n a=a+b } Edit 2: Compiled the code ... ); return 0; } output I get is 8 6 which means the else case is never executed hence in worst case do we have to consider the else part.
sripo
asked
in
Algorithms
Nov 6, 2018
by
sripo
1.4k
views
algorithms
time-complexity
asymptotic-notations
space-complexity
0
votes
1
answer
5
ACE algo test series
Ans given is option-B
Daniyal89
asked
in
Algorithms
Sep 30, 2018
by
Daniyal89
323
views
sorting
space-complexity
algorithms
ace-test-series
0
votes
0
answers
6
Space complexity
Stack space size of counting numbers of inversion??????
Deepalitrapti
asked
in
Algorithms
Sep 2, 2018
by
Deepalitrapti
85
views
space-complexity
0
votes
1
answer
7
Algorithms
what is space complexity of an algo? and what is the number of function calls in general?
shipra tressa
asked
in
Algorithms
Aug 31, 2018
by
shipra tressa
161
views
space-complexity
descriptive
5
votes
2
answers
8
Test Algorithms
What is the space complexity of the following code? $O(logn)$ $O(n)$ $O(nlogn)$ $O(1)$
Shivani gaikawad
asked
in
Algorithms
Aug 17, 2018
by
Shivani gaikawad
641
views
algorithms
space-complexity
test-series
1
vote
1
answer
9
Space Complexity of Dijkastra's algorithm
I read that the space complexity of Dijasktra is $O(V^2)$ . (http://igraph.wikidot.com/algorithm-space-time-complexity) But how ????
Hardik Maheshwari
asked
in
Algorithms
Jul 5, 2018
by
Hardik Maheshwari
2.6k
views
dijkstras-algorithm
shortest-path
space-complexity
algorithms
graph-algorithms
greedy-algorithm
0
votes
0
answers
10
#Algorithms Space Complexity Vs Auxiliary Space Complexity?
I'm kind of confused between these two terms as for example - the Auxiliary space of merge sort, heapsort and insertion sort is O(1) whereas Space complexity of merge sort, insertion sort, heapsort is O(n). So, if someone ... ? Furthermore I know - Space Complexity = Auxiliary Space + space taken by also wrt input. Kindly help, thank you!
iarnav
asked
in
Algorithms
Jun 26, 2018
by
iarnav
386
views
algorithms
space-complexity
0
votes
1
answer
11
Space Complexity of Build Max Heap
Since Heapify is a recursive function, its space complexity is $O(logn)$ because of the stack space required for recursion. I also read that space complexity of heapsort is $O(1)$ beause of the explanation here - https://gateoverflow.in/79909/ ... complexity of build heap is $O(logn)$ then heapsorts complexity should also be the same . What am I missing here ?
Hardik Maheshwari
asked
in
Algorithms
Jun 14, 2018
by
Hardik Maheshwari
3.2k
views
space-complexity
algorithms
heap
heap-sort
0
votes
3
answers
12
Self-Doubt
int main() { int i; for(i=1;i<=n;i++) f(i); } void f(int n) { int A[n]; int j; for(j=1;j<=n;j++) cout<<j; } What will be the time and space complexity of the following code snippet ?
Phlegmatic
asked
in
Algorithms
Jun 8, 2018
by
Phlegmatic
227
views
algorithms
time-complexity
space-complexity
1
vote
1
answer
13
Evaluation of Postfix expression using stack
What is time and space complexity to evaluate postfix expression ?
JaiKumar Guwalani
asked
in
DS
May 6, 2018
by
JaiKumar Guwalani
2.0k
views
data-structures
time-complexity
space-complexity
infix-prefix
stack
1
vote
2
answers
14
Space complexity of Huffman coding
what is Space complexity of Huffman coding?
Akash Kumar Roy
asked
in
Algorithms
Apr 26, 2018
by
Akash Kumar Roy
2.6k
views
huffman-code
algorithms
space-complexity
1
vote
3
answers
15
MY DOUBT: Worst case space complexity of Quick sort (NOT FOR A STRAIGHT ANSWER)
First read it properly. I am not asking a specific question about space complexity. Question: What is worst case space complexity of quick sort? Everywhere it is showing O(logn). My understanding about it: I know that Quick ... done by ratio 1:n-1 which is worst case, wouldn't it be requesting for O(n) stack records?
Akash Kumar Roy
asked
in
DS
Apr 21, 2018
by
Akash Kumar Roy
1.9k
views
algorithms
sorting
data-structures
space-complexity
0
votes
1
answer
16
test series
is it true that space complexity is always less than equal to time complexity i.e. S(n) = O(T(n)) I think it is.
mehul vaidya
asked
in
Algorithms
Mar 31, 2018
by
mehul vaidya
112
views
test-series
space-complexity
time-complexity
1
vote
0
answers
17
How large can the ratio of two memory requirements get?
Sartaj Sahani Chapter 7 question 9 I seem to have stumbled upon something very basic, and I can't figure out why. The question asks "How large can the ratio of two memory requirements get?" when a 2D Array is stored as a 2d array in c++ and when ... 4m) / (4mn) = 1 + 4/n. Shouldn't it be 1 +1/n ? Can anyone help me out here ? Thanks.
XbrucewayneX
asked
in
DS
Mar 3, 2018
by
XbrucewayneX
250
views
data-structures
array
space-complexity
3
votes
1
answer
18
Algorithms
I am having a doubt in this question. The binary search algorithm is implemented using recursion. Then the space complexity is :- (1) O( 1 ) (2) O( n ) (3) O( logn ) (4) O(n logn ) According to me, the answer should be option 2. Please explain the solution as well.
Asim Abbas
asked
in
Programming
Jan 12, 2018
by
Asim Abbas
620
views
algorithms
space-complexity
1
vote
1
answer
19
binary search space complexity
Aditya Bahuguna
asked
in
Algorithms
Jan 7, 2018
by
Aditya Bahuguna
1.4k
views
binary-search
recursion
space-complexity
test-series
3
votes
1
answer
20
merge sort
Merge sort using linked list is better than array in terms of space complexity true or not with explanation :)
A_i_$_h
asked
in
Algorithms
Nov 14, 2017
by
A_i_$_h
507
views
algorithms
merge-sort
space-complexity
3
votes
2
answers
21
Space complexity
Worst case and best case space complexity of merge sort is ___________________________
srestha
asked
in
Algorithms
Nov 11, 2017
by
srestha
372
views
algorithms
space-complexity
2
votes
1
answer
22
How to determine the time complexity of this loop?
// func() is any constant root function for (int i = n; i > 0; i = func(i)) { // some O(1) expressions or statements } "In this case, i takes values n, n1/k, (n1/k)1/k = n1/k2, ... do we calculate that there are logk(log(n)) iterations? Source: http://www.geeksforgeeks.org/time-complexity-loop-loop-variable-expands-shrinks-exponentially/
Narasimhan
asked
in
Algorithms
Nov 7, 2017
by
Narasimhan
859
views
algorithms
asymptotic-notations
time-complexity
space-complexity
non-gate
5
votes
1
answer
23
In-place Merge Sort via Doubly linked list in place of Array
In general merge sort is not considered in-place sorting technique. Because an auxiliary array is used. If we will try to do it in-place in array data structure then our merge procedure will take O($n^2$) time. so overall ... list in place of Array (for storing and merging data) ? Please share your valuable opinion. It will be great help.
Chhotu
asked
in
Algorithms
Nov 2, 2017
by
Chhotu
1.0k
views
algorithms
sorting
space-complexity
linked-list
time-complexity
1
vote
1
answer
24
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
163
views
binary-search
recursion
space-complexity
time-complexity
0
votes
1
answer
25
complexity analysis
Space complexity = input size + extra space So, heap sort also takes input of an 'n' size array. Does this mean that space cost of heap sort algo is O (n).
Suryakant
asked
in
Algorithms
Jun 30, 2017
by
Suryakant
383
views
space-complexity
sorting
heap-sort
Page:
1
2
next »
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
RECRUITMENT IN OIL AND GAS CORPORATION LIMITED
Aptitude Overflow Book
Participate in Machine Learning benchmarking
GATE Overflow Tikz Templates
UPSC One Time Registration OTR Online Form 2022
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(8.9k)
Digital Logic
(3.2k)
Programming and DS
(5.7k)
Algorithms
(4.5k)
Theory of Computation
(6.5k)
Compiler Design
(2.2k)
Operating System
(4.8k)
Databases
(4.4k)
CO and Architecture
(3.6k)
Computer Networks
(4.4k)
Non GATE
(1.2k)
Others
(2.5k)
Admissions
(645)
Exam Queries
(839)
Tier 1 Placement Questions
(17)
Job Queries
(73)
Projects
(9)
Unknown Category
(851)
Recent questions tagged space-complexity
Recent Blog Comments
"If you are dead tomorrow your GATE rank is not...
@saheb sarkar1997 Please check the Test...
Sir some test due date passed 1-2 months ago pls...
@lalitver10 There is no restriction in doing...
@GateOverflow04 link fixed now.