Week 4 Flashcards

1
Q

Scientific method

A
  1. Observe some feature of the natural world.
  2. Hypothesize a model that is consistent with the observations.
  3. Predict events using the hypothesis.
  4. Verify the predictions by making further observations.
  5. Validate by repeating until the hypothesis and observations agree.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two primary factors determining the total running time:

A

The cost of executing each statement.
The frequency of execution of each statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Binary search

A

Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you’ve narrowed down the possible locations to just one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly