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...
Which of the following is not an advantage of using the RTF or XPS file formats?
A) They are fixed file formats. B) They retain their formats no matter application is used to open them. C) They can be viewed and printed by any platform. D) The files are easy to modify.
Computer Science & Information Technology
The proofing options included in Word 2010 eliminate the need for manual proofreading
Indicate whether the statement is true or false
Computer Science & Information Technology