Quizzma library

Questions and Answers

Browse questions and clear answers across school subjects and test-preparation topics.

Question

Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer. An algorithm that accesses each element in the list twice An algorithm that accesses each element in the list n times An algorithm that accesses only the first 10 elements in the list, regardless of the size of the list Which of the algorithms run in reasonable time?

Consider the following algorithms. Each algorithm operates on a list containing n elements, where n is a very large integer. An algorithm that accesses each element in the list twice An algorithm that accesses each element in the list n…

Read more →
Question

A certain computer has two identical processors that are able to run in parallel. Each processor can run only one process at a time, and each process must be executed on a single processor. The following table indicates the amount of time it takes to execute each of three processes on a single processor. Assume that none of the processes are dependent on any of the other processes

A certain computer has two identical processors that are able to run in parallel. Each processor can run only one process at a time, and each process must be executed on a single processor. The following table indicates the amount of time…

Read more →
Question

A company delivers packages by truck and would like to minimize the length of the route that each driver must travel in order to reach n delivery locations. The company is considering two different algorithms for determining delivery routes. Algorithm I Generate all possible routes, compute their lengths, and then select the shortest possible route. This algorithm does not run in reasonable time.

A company delivers packages by truck and would like to minimize the length of the route that each driver must travel in order to reach n delivery locations. The company is considering two different algorithms for determining delivery…

Read more →
Question

A graphic artist uses a program to draw geometric shapes in a given pattern. The program uses an algorithm that draws the shapes based on input from the artist. The table shows the approximate number of steps the algorithm takes to draw different numbers of shapes.

A graphic artist uses a program to draw geometric shapes in a given pattern. The program uses an algorithm that draws the shapes based on input from the artist. The table shows the approximate number of steps the algorithm takes to draw…

Read more →
Question

A team of programmers is designing software. One portion of the project presents a problem for which there is not an obvious solution. After some research, the team determines that the problem is undecidable. Which of the following best explains the consequence of the problem being undecidable?

A team of programmers is designing software. One portion of the project presents a problem for which there is not an obvious solution. After some research, the team determines that the problem is undecidable. Which of the following best…

Read more →
Question

A certain computer game is played between a human player and a computer-controlled player. Every time the computer-controlled player has a turn, the game runs slowly because the computer evaluates all potential moves and selects the best one. Which of the following best describes the possibility of improving the running speed of the game?

A certain computer game is played between a human player and a computer-controlled player. Every time the computer-controlled player has a turn, the game runs slowly because the computer evaluates all potential moves and selects the best…

Read more →
Question

A computer has two processors that are able to run in parallel. The table below indicates the amount of time it takes either processor to execute four different processes. Assume that none of the processes is dependent on any of the other processes.

A computer has two processors that are able to run in parallel. The table below indicates the amount of time it takes either processor to execute four different processes. Assume that none of the processes is dependent on any of the other…

Read more →
Question

Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, they should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in the correct order?

Three different numbers need to be placed in order from least to greatest. For example, if the numbers are ordered 9, 16, 4, they should be reordered as 4, 9, 16. Which of the following algorithms can be used to place any three numbers in…

Read more →
Question

During an experiment a student records and that horizon force exerted on an object moving in a straight line along a horizontal frictionless track. The graph above shows the force as a function of time. Of the following, which is the best approximation of the magnitude of the change in momentum of the object between zero seconds and four seconds?

During an experiment a student records and that horizon force exerted on an object moving in a straight line along a horizontal frictionless track. The graph above shows the force as a function of time. Of the following, which is the best…

Read more →
Question

A large spreadsheet contains the following information about local restaurants. A sample portion of the spreadsheet is shown below. In column B, the price range represents the typical cost of a meal, where "lo" indicates under $10, "med" indicates $11 to $30, and "hi" indicates over $30. In column D, the average customer rating is set to -1.0 for restaurants that have no customer ratings. A student is developing an algorithm to determine which of the restaurants that accept credit cards has the greatest average customer rating. Restaurants that have not yet received any customer ratings and restaurants that do not accept credit card are to be ignored. Once the algorithm is complete, the desired restaurant will appear in the first row of the spreadsheet. If there are multiple entries that fit the desired criteria, it does not matter which of them appears in the first row. The student has the following actions available but is not sure of the order in which they should be executed. Assume that applying either of the filters will not change the relative order of the rows remaining in the spreadsheet. Which of the following sequences of steps can be used to identify the desired restaurant? Filter by number of ratings, then filter by payment type, then sort by rating Filter by number of ratings, then sort by rating, then filter by payment type Sort by rating, then filter by number of ratings, then filter by payment type

A large spreadsheet contains the following information about local restaurants. A sample portion of the spreadsheet is shown below. In column B, the price range represents the typical cost of a meal, where “lo” indicates under $10, “med”…

Read more →
Question

A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list. For example, if utensils initially contains ["fork", "spoon", "tongs", "spatula", "whisk"], it should contain ["whisk", "fork", "spoon", "tongs", "spatula"] after executing the code segment. Which of the following code segments transforms the list as intended?

A code segment is intended to transform the list utensils so that the last element of the list is moved to the beginning of the list. For example, if utensils initially contains [“fork”, “spoon”, “tongs”, “spatula”, “whisk”], it should…

Read more →
Question

A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume that numberList contains at least two elements. Which of the following changes is needed for the program to work as intended?

A list of numbers is considered increasing if each value after the first is greater than or equal to the preceding value. The following procedure is intended to return true if numberList is increasing and return false otherwise. Assume…

Read more →
Question

In the sixth sentence of the third paragraph ("She campaigned . . . and to her"), the author uses the dash primarily to A) stress a significant connection B) clarify a potential ambiguity C) introduce a minor detail D) qualify a sweeping assertion E) fend off a likely objection

In the sixth sentence of the third paragraph (“She campaigned . . . and to her”), the author uses the dash primarily to A) stress a significant connection B) clarify a potential ambiguity C) introduce a minor detail D) qualify a sweeping…

Read more →