What is an algorithm?
A sequence of steps taken to solve a problem.
What is the most important when it comes to creating algorithms?
Correctness
What is algorithm time efficiency?
The number of calculations required to solve a problem.
How does a linear search work?
Checks each number from start to finish.
How does binary search work?
First, it checks the middle of the specified range. For example, a contact list might start at “M”; if looking for “H”, it would search the upper half, starting at the midpoint between A and L. This continues until the search finds the specified letter.
How many searches does binary usually require?
10
How many searches does linear usually require?
For 500 items, usually 250 searches.
What is a computational problem?
An input that is answered by using a computer.
What is required for a computational problem?
problem input, question to be answered and desired output
What ways can an algorithm be described?
English, Pseudocode, programming language, hardware, etc.
What is computational complexity?
The amount of resources it takes to run an algorithm. Mostly runtime and memory.
What is NP-Complete?
A problem where there isn’t a known efficient algorithm.
What does space complexity mean?
represents the number of fixed memory units.
What does runtime complexity mean?
number of constant-time operations performed by the algorithm.
What is the difference between axillary space complexity and space complexity?
axillary space complexity does not include input data.
When is binary search benefitical?
When the items being searched are sorted.
What is heuristic?
A less accurate way to improve execution speed for algorithms that do not have the needed computational resources.
Is “The pool’s water level is low. What should be added.” an algorithm? Why.
No, because an algorithm consists of steps.