WGU C949 STRUCTURES
AND ALGORITHMS
[Document subtitle]
[DATE]
[COMPANY NAME]
[Company address]
, Certainly! Here are all the questions numbered along with their answers:
1. A function whose cost scales linearly with the size of the input
**O(n)**
2. Iterating over a collection of data once often indicates an ______ algorithm. (alphabet for-
loop example)
**O(n)**
3. A function whose cost scales logarithmically with the input size
**O(log n)**
4. Which type of function works by breaking down large problem into smaller and smaller
chunks?
**O(log n)**
5. As the size of the input grows, the cost of the algorithm does not increase at the same
rate. The overall cost of performing an operation on 1,000,000 items is only twice that of
performing the operation on 1,000 items.
**O(log n)**
6. A function that exhibits quadratic growth relative to the input size
**O(n^2)**
7. An example of this type of function is doubly nested loop
**O(n^2)**
8. Which type of function gets really expensive really quickly?
**O(n^2)**
AND ALGORITHMS
[Document subtitle]
[DATE]
[COMPANY NAME]
[Company address]
, Certainly! Here are all the questions numbered along with their answers:
1. A function whose cost scales linearly with the size of the input
**O(n)**
2. Iterating over a collection of data once often indicates an ______ algorithm. (alphabet for-
loop example)
**O(n)**
3. A function whose cost scales logarithmically with the input size
**O(log n)**
4. Which type of function works by breaking down large problem into smaller and smaller
chunks?
**O(log n)**
5. As the size of the input grows, the cost of the algorithm does not increase at the same
rate. The overall cost of performing an operation on 1,000,000 items is only twice that of
performing the operation on 1,000 items.
**O(log n)**
6. A function that exhibits quadratic growth relative to the input size
**O(n^2)**
7. An example of this type of function is doubly nested loop
**O(n^2)**
8. Which type of function gets really expensive really quickly?
**O(n^2)**