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 10731Find 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 23593Post New CTS C++ Code Interview Questions
can a network interface in one vpc be attached to an instance that is present in another vpc?
Which routing rules has to be defined in sap hana studio to configure web dispatcher to use https request?
What does FOREACH do?
Can you select direct fi posting for a depreciation run? : fi- asset accounting
What is the purpose of @key?
If I purchase flex builder 2, am I eligible for an upgrade to flex builder 3?
I have 3 transactions,where the output of one transaction is input of another and output of 2nd transaction is input of 3rd transaction.i have one flat file with all data for the 3 transaction.if the 3rd transaction failed can we rollback the remaining 2 transactions or not.Is this possible in BDC,How/
Are structs value types or reference types?
What is apache http server?
Is c++ a software?
All of the following are true regarding the WBS except: A. It is a deliverables-oriented grouping of project deliverables and elements. B. It defines and organizes the work of the project in a hierarchical form. C. It provides a framework for the work of the project, and work not shown on the WBS is not included in the project. D. It defines all the deliverables of the project, but the activities level should not be listed on the WBS.
I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”
What is MRP procedure
How many codes are used when u design a Pressure Vessel
How do I create a web form?