Suppose that you have been given an O(N) algorithm that averages student grades, where N is the number of grades. If it takes 1 minute to average 100 grades using the algorithm, how long would you expect it to take to average 200 grades? 400 grades? Justify your answer.
What will be an ideal response?
Since the algorithm is O(N), doubling the size of the problem should roughly double the time required for a solution. Thus, 200 grades would require roughly 2 minutes, and 400 grades would require roughly 4 minutes.
You might also like to view...
Which of the following are valid Java statements?
A. Color c = new Color(0, 255, 0); B. Color c = new Color(0.0f, 1.0f, 0.0f); C. Color c = new Color(0.0d, 1.0d, 0.0d); D. setGreen(c.getGreen() - 2); a. All of the above. b. A, B, C. c. A, B, D. d. A, B.
C:\Program Files\Microsoft Office\Office\ACMIZ\... is considered a:
A) source. B) directory. C) path. D) file.
Document properties, also known as metadata, includes specific data about the presentation. _________________________
Answer the following statement true (T) or false (F)
The data type of an atomic value is specified using the _____ attribute.
A. ?using B. ?as C. ?type D. ?dataType