What is the time complexity of the following program?

int N = 0, M = 10;
for (int x = 0; x <= M; x++ ) {
for (int y = 0; y <= N; y++ ) {
writeToDisk(""something"");
}
}
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...

For an audience, distributing speaker notes with handouts provides additional detail and background.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Choose the sentence with the correct comma usage from the following set of sentences.?

A. ?Asif bought the postcards but Carmen forgot the stamps. (No commas) B. ?Asif bought the postcards, but Carmen forgot the stamps. C. ?Asif bought the postcards, but, Carmen forgot the stamps.

Computer Science & Information Technology

When you click the Decrease Font Size button, Excel assigns the next highest font size in the Font Size gallery.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

In the figure above, which number refers to the Set the text color button?

A. 2 B. 3 C. 4 D. 5

Computer Science & Information Technology