click below
click below
Normal Size Small Size show me how
Searching & Algo
Searching and Algorithms
| Question | Answer |
|---|---|
| ___________ is a search algorithm that starts from the beginning of a list, and checks each element until the search key is found or the end of the list is reached. | linear search |
| An algorithm's ___________ is the time the algorithm takes to execute. | runtime |
| A ___________ is an operation that, for a given processor, always operates in the same amount of time, regardless of input values. | constant time operation |
| ___________: A function f(N) that is ≤ the best case T(N), for all values of N ≥ 1. | lower bound |
| ___________: A function f(N) that is ≥ the worst case T(N), for all values of N ≥ 1. | upper bound |
| ___________ is the classification of runtime complexity that uses functions that indicate only the growth rate of a bounding function. | asymptotic notation |
| ___________ provides a growth rate for an algorithm's upper bound. | O notation |
| ___________ provides a growth rate for an algorithm's lower bound. | Ω notation |
| ___________ provides a growth rate that is both an upper and lower bound. | Θ notation |
| A ___________ is an algorithm that breaks the problem into smaller subproblems and applies the algorithm itself to solve the smaller subproblems. | recursive |
| ___________: A case where a recursive algorithm completes without applying itself to a smaller subproblem | base case |
| The ___________ is a numerical sequence where each term is the sum of the previous 2 terms in the sequence, except the first 2 terms, which are 0 and 1. | fibonacci sequence |
| 13. ___________ is an algorithm that searches a sorted list for a key by first comparing the key to the middle element in the list and recursively searching half of the remaining list so long as the key is not found. | binary search |
| 14. ___________: A function f(N) that is defined in terms of the same function operating on a value < N. | recurrence relation |