What is the space complexity of the following program?
double a = 0, b = 0;
for (int x = 0; x <= M; x++ ) {
a += Math.random();
}
for (int x = 0; x <= N; x++ ) {
b += Math.random();
}
a. O(1)
b. O(N+M)
c. O(N*M)
d. O(N)
a. O(1)
You might also like to view...
The border to the right of a column is the ____.
A. column boundary B. table resize handle C. row boundary D. table boundary
In query criteria, when searching for a single unknown character, use the "?" character
Indicate whether the statement is true or false
The ________ font is applied to titles and the ________ font is applied to all other text in slides
A) Body; Body 2 B) Headings1; Headings2 C) Headings; Body D) Level 1; Level 2
A ________ is a number assigned to each running process
A) Process Number B) Process Identifier C) Program Identifier D) Program Number