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 10856Find 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 23814Post New CTS C++ Code Interview Questions
What is setautocommit in jdbc?
Define the Analytics Function in Azure Cloud Service?
Will you be able to store pictures in the database?explain.
Give some examples of private network addresses.
Explain are data mart and dwh normalized or denormalized? Do both of them exist in the same tier?
If there is major % of Voltage harmonics in the system, how can it be control or reduced?
How to design 12*12*14 room having rrc slab ,coloum, beam,foundation?
Why even multiple power supplu r used in instrumentation system?
How can we schedule the graph in unix?
What is an object server in client server environment?
What is the main function of ms word?
What does those terms actually mean included in the j.d.k i.6?
What are the advantages of using a spreadsheet?
Define flask in python?
How does max heap work?