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 10730Find 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 23592Post New CTS C++ Code Interview Questions
What is a page gutter?
what is interface and when it is used?
What do you mean by category and when to use it?
What is ms word pdf?
Explain some features of jquery knockout?
How to use values from other tables in update statements in ms sql server?
What is the Boundary value analysis and Equlance class partition for select * from emp
how to pick up the changed records every time in a subfile after the first change made ?
i am btch 4th semester ece student.i want to get idea 6th month indistrial tranning and job in tcs.
How do you play a powerpoint on a loop?
What are the different plug-ins stages used in your projects?
what are the negative points which you think are there in the company?
Which one is beneficial big Ad once or smaller Ads many times?
What are the important delegate methods of nsxml parser?
How to display arraylist values in java?