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
1
#AppliedGate
Dknights
asked
in
Algorithms
Jan 2
by
Dknights
159
views
space-complexity
algorithms
0
votes
3
answers
2
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
721
views
algorithms
time-complexity
space-complexity
self-doubt
0
votes
0
answers
3
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 in C
Aug 24, 2022
by
chokostar
479
views
space-complexity
0
votes
0
answers
4
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 ... 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 17, 2022
by
makhdoom ghaya
200
views
go-classroom
video-links
missing-videos
free-videos
asymptotic-notation
time-complexity
space-complexity
1
vote
1
answer
5
UGC NET CSE | October 2020 | Part 2 | Question: 73
Match $\text{List I}$ with $\text{List II}$ ... $\text{A-III, B-II, C-IV, D-I}$ $\text{A-III, B-IV, C-II, D-I}$
go_editor
asked
in
Algorithms
Nov 20, 2020
by
go_editor
867
views
ugcnetcse-oct2020-paper2
space-complexity
algorithms
1
vote
0
answers
6
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
2.0k
views
algorithms
time-complexity
asymptotic-notation
space-complexity
0
votes
1
answer
7
ACE algo test series
Ans given is option-B
Daniyal89
asked
in
Algorithms
Sep 30, 2018
by
Daniyal89
732
views
sorting
space-complexity
algorithms
ace-test-series
0
votes
0
answers
8
Space complexity
Stack space size of counting numbers of inversion??????
Deepalitrapti
asked
in
Algorithms
Sep 2, 2018
by
Deepalitrapti
167
views
space-complexity
0
votes
1
answer
9
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
388
views
space-complexity
descriptive
5
votes
2
answers
10
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
1.0k
views
algorithms
space-complexity
test-series
2
votes
1
answer
11
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
3.0k
views
dijkstras-algorithm
shortest-path
space-complexity
algorithms
graph-algorithm
greedy-algorithm
0
votes
0
answers
12
#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 ... ? 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
590
views
algorithms
space-complexity
0
votes
1
answer
13
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
4.7k
views
space-complexity
algorithms
binary-heap
heap-sort
0
votes
3
answers
14
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
503
views
algorithms
time-complexity
space-complexity
1
vote
1
answer
15
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.7k
views
data-structures
time-complexity
space-complexity
infix-prefix
stack
1
vote
2
answers
16
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
4.0k
views
huffman-code
algorithms
space-complexity
1
vote
3
answers
17
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 ... 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.4k
views
algorithms
sorting
data-structures
space-complexity
0
votes
1
answer
18
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
292
views
test-series
space-complexity
time-complexity
1
vote
0
answers
19
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++ ... ) / (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
313
views
data-structures
array
space-complexity
3
votes
1
answer
20
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 in C
Jan 12, 2018
by
Asim Abbas
984
views
algorithms
space-complexity
1
vote
1
answer
21
binary search space complexity
Aditya Bahuguna
asked
in
Algorithms
Jan 7, 2018
by
Aditya Bahuguna
2.4k
views
binary-search
recursion
space-complexity
test-series
3
votes
1
answer
22
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
742
views
algorithms
merge-sort
space-complexity
3
votes
2
answers
23
Space complexity
Worst case and best case space complexity of merge sort is ___________________________
srestha
asked
in
Algorithms
Nov 11, 2017
by
srestha
610
views
algorithms
space-complexity
2
votes
1
answer
24
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
1.0k
views
algorithms
asymptotic-notation
time-complexity
space-complexity
non-gate
5
votes
1
answer
25
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.4k
views
algorithms
sorting
space-complexity
linked-list
time-complexity
Page:
1
2
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged space-complexity
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...