What is the time complexity of the following program?
double a = 0;
for (int x = 0; x <= 100; x++ ) {
a += Math.random();
}
a. O(1)
b. O(100)
c. O(N)
d. This cannot be determined
a. O(1)
Computer Science & Information Technology
You might also like to view...
What do we call the color of the border of an object?
A. fill B. stroke C. score D. draft
Computer Science & Information Technology
To force a page break where it would not normally occur:
A) click the Insert tab and click Quick Parts. B) press Ctrl+Enter. C) press Ctrl+Tab. D) click the Page Layout tab and select Section Break.
Computer Science & Information Technology
The time required for a signal to travel to a satellite is called ____________________.
Fill in the blank(s) with the appropriate word(s).
Computer Science & Information Technology
What are Enterprise JavaBeans?
What will be an ideal response?
Computer Science & Information Technology