Takeaways

  • On my collegeboard MC #2, my score was 44/50

Questions

Q12: Controlling an elevator in a building?
  • I chose “(onFloor1 AND callTo2) AND (onFloor2 AND callTo1)” but the answer was “(onFloor1 OR callTo2) AND (onFloor2 AND callTo1)”
  • Notes
    • I overlooked the fact that there were two answers that were the same, the only difference being that one was AND and the other OR. In both the ways that the answer calls the function, the elevator will be able to move which is why the correct answer is “OR”

Q15: Robot in maze series of ifs?

  • I chose:

  • Notes

    • I think I was confused with how the function worked so I wasn’t able to understand how the robot moved around the map.

Q33: Find maximum value algorithms?

  • “Algorithm I : Set the value of a variable max to − 1. Iterate through the list of integer values. If a data value is greater than the value of the variable max, set max to the data value.
  • Algorithm II : Set the value of a variable max to the first data value. Iterate through the remaining values in the list of integers. If a data value is greater than the value of the variable max, set max to the data value.
  • I chose the answer that said that both algorithms will always work but the correct answer was that “Algorithm II always works correctly, but Algorithm I only works correctly when the maximum value is greater than or equal to − 1”
  • Notes

Q34: binary search on a list of 500 elements

  • A sorted list of numbers contains 500 elements. Which of the following is closest to the maximum number of list elements that will be examined when performing a binary search for a value in the list?
  • I chose “250” but the answer was “10”
  • Notes
    • The binary search algorithm starts in the center of the sorted list and continuously removes half of the elements until the target data is known or all of the items are removed.
    • A list of 500 elements would be chopped in half up to 9 times (with a total of 10 elements examined).
    • The particular prerequisites with 500 items and are decreased to 250 elements, then 125 aspects, then 62 elements, 31 aspects, 15 aspects, 7 aspects, 3 aspects, and ultimately 1 element.

Q42: Car manufacturer simulations?

  • Using simulation software can save the company money by helping to compare designs early in the process, before prototype cars are built.
  • Using simulation software can help to identify safety issues by providing data about how different mechanical components will interact in a wide variety of situations.
  • The manufacturer can present simulation software to customers to demonstrate different design possibilities.
  • Notes
    • the questions asked which options would be a benefit of using simulations for a company. I said that only the first to were correct but the answer was all 3.
    • I now think that the third one is correct because its important to go through user testing to get optimal results

Q47: Programs that benefit from heuristics?

  • I chose “A program that calculates a student’s grade based on the student’s quiz and homework scores”
  • The correct answer was “TA program that finds the shortest driving route between two locations on a map”
  • Notes
    • a grade calculator can calculate an exact score when given the students scores, so it does not need a heuristic solution
      Finding the shortest driving route is an optimization problem that cannot be solved in a reasonable time, and a heuristic is a technique that can find an approximate solution more quickly when exact methods are too slow.