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 10735Find 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 23604Post New CTS C++ Code Interview Questions
What is a difference between indoor transformer and outdoor transformer of same rating
What is a proxy in web service?
what are the difference between AC lamp and DC lamp
What are the advantages of sap xi over other tools?
Daily announced price of Gold. this price is included vat ya without vat. pls give me solution.
Explain python list comprehension?
What is the file extension for java?
What are the components of an effective merit pay plan?
I want to know about rolling margin of steel :- For eg. If 2nos. bundle of 8mm dia steel with17 rods each of length 12m comes to store. During testing of 1m rod of each bundle it was found that 1rod has weight .405kg/m while other has .385kg/m. Now what will happen in case of steel payment and measurement payment ? Regards,
If a developer creates a new css file then where should the file be stored?
What is the advantage of bw reporting on co-pa data compared with directly running the queries on co-pa?
Is c compiled or interpreted?
Name the chemical compound which is a surface disinfectant acceptable for use on treatment areas after therapy on a suspected hepatitis B carrier?
What are ways to create input forms for workflow ?
What is the use of recover stage in blue prism?