Recent questions tagged space-complexity

0 votes
1 answer
1
0 votes
3 answers
2
0 votes
0 answers
3
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...
1 votes
1 answer
5
Match $\text{List I}$ with $\text{List II}$$\begin{array}{llll} & \text{List I} & & \text{List II} \\ (A) & \text{Greedy Best-First Search} & (I) & \text{Space complexity...
0 votes
1 answer
7
0 votes
0 answers
8
Stack space size of counting numbers of inversion??????
0 votes
1 answer
9
what is space complexity of an algo?and what is the number of function calls in general?
5 votes
2 answers
10
What is the space complexity of the following code?$O(logn)$ $O(n)$$O(nlogn)$ $O(1)$
0 votes
3 answers
14
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 cod...
1 votes
2 answers
16
0 votes
1 answer
18
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.
3 votes
1 answer
20
3 votes
1 answer
22
Merge sort using linked list is better than array in terms of space complexitytrue or not with explanation :)
3 votes
2 answers
23
Worst case and best case space complexity of merge sort is ___________________________