search
Log In

Recent questions tagged time

0 votes
1 answer
1
asked Jan 20, 2019 in Algorithms Rackson 98 views
0 votes
1 answer
2
Consider the following function(n) { val=0; for i=1 to n { if(n<=10000) for j=1 to n for k=1 to n val = val + 1; else for j=1 to n val = val + 1; } } The running time of the above function can best be described by $T(n)=$____________ $A)\theta(n^{3}) $ $B)\theta(n^{2})$ $C)\theta(n)$ $D)\theta(1)$
asked Nov 3, 2018 in Algorithms Lakshman Patel RJIT 125 views
0 votes
1 answer
4
C function let n>=m. int gcd(n,m) { if(n%m==0) return m; n=n%m; return gcd(m,n); } time complexity
asked Sep 11, 2018 in Algorithms amit166 53 views
1 vote
3 answers
5
while solving this recursive equation: T(n)=T(n/3)+T(2n/3)+n; i tried the master theorem ignoring the less long term T(n/3) this gave me : T(n)=T(2n/3)+n; and it leads to O(n) Time complexity. And doing with recursive tree method it gave me N(logN base 3/2).. So what is wrong with master theorem approach?
asked Jul 22, 2018 in Algorithms aaaaaaaa 95 views
0 votes
0 answers
6
To prove that the time complexity of equation T(n) = T(α n) + T((1 – α)n) + βn is Θ(n logn).
asked Jul 2, 2018 in Algorithms pk14697 119 views
1 vote
2 answers
7
What will be the time complexity of A() { int i,j,k,n; for(i=1;i<=n;i++) { for(j=1;j<=(i^2);j++) { for(k=1;k<=(n/2);k++) { printf("ABCD"); } } } }
asked Oct 20, 2017 in Algorithms Manish Chetwani 156 views
1 vote
2 answers
8
what is the time complexity of finding a number in a heap sort in worst case & what is the time complexity for deleting the element from heap?
asked Apr 1, 2017 in Algorithms itsapoorv94 434 views
1 vote
2 answers
9
Actually there is solution also but not able to take screen shot. My solution is : TA1 = 0.95*30+0.05*300 TA2=0.95*30+0.05*270 TA1-TA2=3ns Am I correct?
asked Jan 21, 2016 in CO and Architecture Sumit1311 473 views
10 votes
3 answers
10
Can anyone explains when to use this formulas? Average memory access time (AMAT) AMAT = Hit Time + Miss Rate * Miss Penality OR &bull; Effective Access Time: 1. Hit Rate * Hit time+ Miss Rate * Miss Penality 2. [ (H)(TLB access time + mem access time) + (1-H)(TLB access + PT access + mem access)]
asked Jan 17, 2016 in CO and Architecture Pradip Nichite 17.2k views
4 votes
2 answers
11
Which of the following is true? $f(n)=O\left(\left(f\left(n\right)\right)^{2}\right)$ $f(n)=O\left(g\left(n\right)\right)\Rightarrow 2^{f\left (n\right)}=O\left(2^{g\left(n\right)}\right)$ $f(n)+O\left(f\left(n\right)\right)=\theta \left(f\left(n\right)\right)$ Both (a) and (b)
asked Jan 4, 2016 in Algorithms saurav04 394 views
To see more, click for the full list of questions or popular tags.
...