MCQ Test #2 Errors Blog

Score: 41/50

Question 7

I got this wrong because by the last step “sheep” would already have the “goats” value in it, so “goats” would still remain as “goats.”

Question 14

Input A must be “true” because if A was false, then two of the same values in a OR operator would return false, which would make the output after the AND operator as false.

Question 16

The algorithm is choosing which numbers are even. This requires selection.

Question 22

Both algorithms work because algorithm A adds all the students’ values and discards the previously added value. The end value would result in the sum of all the students’ heights, so algorithm A works.

Question 33

Algorithm I doesn’t work for values less than -1. If all values are less than -1, then the max would be -1. However, this is not the case as no values are -1.

Question 34

The answer is 10(A) because in binary search the list of 500 elements is “cut in half” ten times.

Question 42

It’s D because III is also correct. It also could be useful in presenting design possibilities to customers.

Question 44

Although actual customer data isn’t available, the average customer wait time can be given.

Question 47

Finding shortest driving route is an optimization problem that can’t be solved in a reasonable time, so a heurisitc is needed. B doesn’t require a heuristic because encryption uses math formulas to process file in a reasonable time.