What is the time complexity of the following program?
int N = 0, M = 10;
for (int x = 0; x <= M; x++ ) {
writeToDisk(""something"");
for (int y = 0; y <= N; y++ ) {
Math.random();
}
}
a. O(M*N)
b. O(N)
c. O(N^2)
d. O(M+N)
a. O(M*N)
Computer Science & Information Technology
You might also like to view...
A(n) ____ is one that occurs at regular intervals, ranging typically from one to three years between reviews.
A. risk-based review B. cost-based review C. asset-based review D. time-based review
Computer Science & Information Technology
A(n) ____________ is software specifically designed to store, retrieve, and manipulate large amounts of data in an organized and efficient manner.
a. search engine b. database management system (DBMS) c. integrated development environment (IDE) d. productivity suite
Computer Science & Information Technology