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 10751Post New Qatar University Interview Questions
What are the limitations of using AI to fight cybercrime?
What is a windows server 2016?
Is it possible to have multiple actions in a same form?
What is the keyboard shortcut for the brush tool?
Why should you show Client/Engineer activities clearly on the project plan?
What is Backus-Naur Formalism?
What is mod and div?
Explain the application of using flyback converter.
What is xml used for?
Why is unix used?
Explain the Difference between Process and a Thread.
How does a random coil differ from an irregularly structured region?
How do I restore my wordpress theme?
Why for attribute is used in html?
when will you use dynamic broadcast receivers?