search
Log In
0 votes
88 views
Find a growth rate that cubes the run time when we double the input size. That is, if T(n) = X, then T(2n) = x^3.
in Algorithms 88 views

Please log in or register to answer this question.

Related questions

1 vote
1 answer
1
115 views
Analyze the runtime of the following piece of code. Give a bound using Θ notation. function Pesky(n) r ←0; for i ←1 to n do for j ←1 to i do for k ← j to i+j do r ←r + 1; return r;
asked Jul 26, 2018 in Algorithms Rishav Kumar Singh 115 views
0 votes
0 answers
2
0 votes
2 answers
3
138 views
The running time of an algorithm is given by T(n)=T(n-1)+T(n-2)-T(n-3), ifn>3 =n, otherwise The order of this algorithm is a)n b)log n c)n^n d)n^2 explain !
asked Sep 5, 2018 in Algorithms balaganesh 138 views
1 vote
1 answer
4
210 views
Consider the following two functions. What are time complexities of the functions? int fun1(int n) { if (n <= 1) return n; return 2*fun1(n-1); } int fun2(int n) { if (n <= 1) return n; return fun2(n-1) + fun2(n-1); } (A) O(2^n) for both fun1() and fun2() (B) O(n) for fun1() and O(2^n) for fun2() (C) O(2^n) for fun1() and O(n) for fun2() (D) O(n) for both fun1() and fun2()
asked Jul 25, 2018 in Algorithms Rishav Kumar Singh 210 views
...