What is the time complexity T(n) of the following program? a) int n, d, i, j; cin >> n; for (d=1; d<=n; d++) for (i=1; i<=d; i++) for (j=1; j<=n; j += n/10) cout << d << " " << i << " " << j << endl; b) void main() { int n, s, t; cin >> n; for (s = 1; s <= n/4; s++) {t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } } c) void main() { int n, r, s, t; cin >> n; for (r = 2; r <= n; r = r * 2) for (s = 1; s <= n/4; s++) { t = s; while (t >= 1) { cout << s << " " << t << endl; t--; } } }
3 10612Find the maximum product of three numbers in an array? Eg. 9,5,1,2,3 Max product= 9*5*3= 135 The array can hav negative numbers also..
7 23370Post New CTS C++ Code Interview Questions
Write a c program for binary addition of two 8 bit numbers.
What is branch coverage?
What Are The Things That You Have To Keep In Concern Before Opening The Bank Accounts?
What is an example of a web server?
How to creat transactions? : abap data dictionary
what operation is performed by job statement?
Tell me would you initialize your strings with single quotes or double quotes?
What is the facility that allows mainframes to be partitioned into lapars?
What steps will you take while send a complex text from the workflow?
Is it still safe to use windows vista?
briefly describe the shell's responsibilities?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
Explain what would you consider as your biggest achievement and why?
What is identity in mysql?
what is the function of gss in the dg set.