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, 2022
by
Nisha Bharti
234
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, 2022
by
chokostar
211
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, 2022
by
makhdoom ghaya
107
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.6k
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
385
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
108
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
192
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
732
views
algorithms
space-complexity
test-series
2
votes
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.7k
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
422
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.8k
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
285
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.2k
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
3.1k
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
2.0k
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
134
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
267
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
705
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.7k
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
555
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
411
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
902
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.1k
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
223
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
438
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
Central Pollution Control Board CPCB Various Post Recruitment 2023
MP Rajya Sahkari Apex Bank Various Post Recruitment 2023
NITIE MUMBAI throgh GATE
PGCIL recruitment 2023 – Apply Online For 138 Posts through GATE
Admission guidance for GATE CSE 2023
Subjects
All categories
General Aptitude
(2.6k)
Engineering Mathematics
(9.4k)
Digital Logic
(3.3k)
Programming and DS
(5.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.7k)
Non GATE
(1.3k)
Others
(2.5k)
Admissions
(655)
Exam Queries
(847)
Tier 1 Placement Questions
(17)
Job Queries
(77)
Projects
(9)
Unknown Category
(866)
Recent questions tagged space-complexity
Recent Blog Comments
Please see the updated link.
Unfortunately there won't be a hardcopy coming...
this book is not available on amazon now, i want...
Yes
Hi! @AnkitMazumder14 bhaiya,Is python...