What is the time complexity of, f(n)= n3+n2+n+4
What is the time complexity of given function,f(n)= n3+n2+n+4 ? Solution: Given, f(n)= n3+n2+n+4 f(n) >= n3+n2+n+4 f(n) >= n3+n2+n, for all n>=1 f(n) >= n3+n2 , for all n>=1 f(n) >= n3, for … Read more
What is the time complexity of given function,f(n)= n3+n2+n+4 ? Solution: Given, f(n)= n3+n2+n+4 f(n) >= n3+n2+n+4 f(n) >= n3+n2+n, for all n>=1 f(n) >= n3+n2 , for all n>=1 f(n) >= n3, for … Read more
What is the time complexity of given function? f(n)=n+4. Solution: Given, f(n)=n+4 n+4 >= n+4 n+4 >= n, where n >= 1 n+4 >= n, for … Read more
What is the time complexity of given function, f(n)= 5n2+3n+4 ? Solution: Given, f(n)=5n2 +3n+4 5n2 +3n+4>=5n2 +3n+4 for all n>=1 5n2 +3n+4>= 5n2 +3n for all n>=1 5n2 +2n+4>=5n2 for all … Read more
What is the time complexity of the program for the sum of two matrices? Step count method void sum() { int n, a[n][n],b[n][n],c[n][n],i,j; //—-0 for(i=0;i<n;i++) //—-n+1 { for(j=0;j<n;j++) //—-n+1 { c[i][j]=a[i][j]+b[i][j]; //—-n … Read more
What is the time complexity of the program for the sum of two numbers using function ? Step count method int sum() { int a,b,c; // —-0 a=10; //—-1 b=20; //—-1 … Read more
What is the time complexity of the program for the sum of two numbers ? Step count method void main() { int a,b,c; //———-0 a=10; //———-1 b=20; //———-1 c=a+b; //———-1 } … Read more