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 10567Find 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 23299Post New CTS C++ Code Interview Questions
What are the benefits of jenkins?
List some factors for performance tuning in data services?
I have working with Rs.180000/- I want fill up itr 1st time What is process.
How to differentiate between a CreateObject() and GetObject() ?
How to create array in JavaScript?
Name the act is passed to prevent efforts to bing money earned through illegal activities in circulation.
What is bash shell?
What is quality audit?
Do you know when should be position management be preferred?
If only R Phase is connected in 2 pole elcb, n is not connected than it will work or not in ground fault.
How to add synchronisation points in qtp?
How do you split a table into two in excel?
what is the use of ocr?
What is meant by public accounting?
Elaborate the fields in bug report in automated testing