Question: An online game collects data about each player s performance in the game. A program is used to analyze the data to make predictions about

An online game collects data about each players performance in the game. A program is used to analyze the data to make predictions about how players will perform in a new version of the game. The procedure GetPrediction (idNum) returns a predicted score for the player with ID number idNum. Assume that all predicted scores are positive. The GetPrediction procedure takes approximately 1 minute to return a result. All other operations happen nearly instantaneously. Two versions of the program are shown below. Version I topScore 0 idList [1298702,1356846,8848491,8675309] FOR EACH id IN idList { score GetPrediction (id) IF (score > topScore){ topScore score }} DISPLAY (topScore) Version II idList [1298702,1356846,8848491,8675309] topID idList[1] FOR EACH id IN idList { IF (GetPrediction (id)> GetPrediction (topID)){ topID id }} DISPLAY (GetPrediction (topID)) Which of the following best compares the execution times of the two versions of the program? (A) Version I requires approximately 1 more minute to execute than version II.(B) Version I requires approximately 5 more minutes to execute than version II.(C) Version II requires approximately 1 more minute to execute than version I. (D) Version II requires approximately 5 more minutes to execute than version I.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!