
These problems were generated by TAs and instructors in previous semesters.
They may or may not match the actual difficulty of problems on Quiz1.
Algorithms and Abstraction
1. As you learned in lecture, computer science boils down to two main ideas:
algorithms and abstraction.
1) Identify/Define the difference between algorithms and abstraction, and provide an
example for each.
2) What are the 3 key components of a good algorithm?
Answer:
1) Algorithms: algorithms are a set of instructions to solve a given task or problem.
An example of an algorithm is a food recipe or a “how-to” manual
Abstraction: technique used to make complex systems manageable by changing
how much detail is used to represent/interact with the system
An example of abstraction is your internet browser. Instead of needing to know
the exact destination of the information you want to see on the internet, you can
search websites by their url or by keywords relating to it.
2) Key components:
Input: Should have a specified input needed in the beginning
Steps: Should have a clearly-described process for how the algorithm runs
Output: Should have a specified output produced at the end