WGU C949 DATA STRUCTURES AND
ALGORITHMS UPDATED QUESTIONS AND
CORRECT ANSWERS
◉ Computational complexity
Answer: the amount of resources used by the algorithm. The most
common resources considered are the runtime and memory
usage.
◉ runtime complexity
Answer: a function, T(N), that represents the number of constant
time operations performed by the algorithm on an input of size N
◉ Space-complexity (of an algorithm)
Answer: a function, S(N), that represents the number of fixed-size
memory units used by the algorithm for an input of size N. Ex: an
algorithm that duplicates a list of numbers is S(N) = N + k, where
k is a constant representing memory used for things like the loop
counter and list pointers.
◉ auxiliary space complexity
Answer: The space complexity not including the input data. Ex: An
algorithm to find the maximum number in a list will have a space
complexity of S(N) = N + k, but an ______ of S(N) = k, where k is a
constant.
,◉ Lower bound
Answer: A function f(N) that is ≤ the best case T(N), for all values
of N ≥ 1
◉ Upper bound
Answer: A function f(N) that is ≥ the worst case T(N), for all
values of N ≥ 1
◉ Asymptotic Notation
Answer: the classification of runtime complexity that uses
functions that indicate only the growth rate of a bounding
function
◉ O notation
Answer: a growth rate for an algorithm's upper bound
◉ Ω notation
Answer: a growth rate for an algorithm's lower bound
◉ Θ notation
Answer: a growth rate that is both an upper and lower bound
◉ Big O notation
, Answer: A mathematical way of describing how a function
(running time of an algorithm) generally behaves in relation to
the input size.
◉ O(N^2)
Answer: A selection sort has a _____ runtime complexity
◉ O(N)
Answer: A linear search has a _____ runtime complexity
◉ Constant
Answer: O(5) has a _____ runtime complexity
◉ Quadratic
Answer: O(N + N^2) has a _____ runtime complexity.
◉ worst-case runtime
Answer: The ______ of an algorithm is the runtime complexity for
an input that results in the longest execution.
◉ recursive algorithm
Answer: An algorithm that breaks the problem into smaller
subproblems and applies the algorithm itself to solve the smaller
subproblems
ALGORITHMS UPDATED QUESTIONS AND
CORRECT ANSWERS
◉ Computational complexity
Answer: the amount of resources used by the algorithm. The most
common resources considered are the runtime and memory
usage.
◉ runtime complexity
Answer: a function, T(N), that represents the number of constant
time operations performed by the algorithm on an input of size N
◉ Space-complexity (of an algorithm)
Answer: a function, S(N), that represents the number of fixed-size
memory units used by the algorithm for an input of size N. Ex: an
algorithm that duplicates a list of numbers is S(N) = N + k, where
k is a constant representing memory used for things like the loop
counter and list pointers.
◉ auxiliary space complexity
Answer: The space complexity not including the input data. Ex: An
algorithm to find the maximum number in a list will have a space
complexity of S(N) = N + k, but an ______ of S(N) = k, where k is a
constant.
,◉ Lower bound
Answer: A function f(N) that is ≤ the best case T(N), for all values
of N ≥ 1
◉ Upper bound
Answer: A function f(N) that is ≥ the worst case T(N), for all
values of N ≥ 1
◉ Asymptotic Notation
Answer: the classification of runtime complexity that uses
functions that indicate only the growth rate of a bounding
function
◉ O notation
Answer: a growth rate for an algorithm's upper bound
◉ Ω notation
Answer: a growth rate for an algorithm's lower bound
◉ Θ notation
Answer: a growth rate that is both an upper and lower bound
◉ Big O notation
, Answer: A mathematical way of describing how a function
(running time of an algorithm) generally behaves in relation to
the input size.
◉ O(N^2)
Answer: A selection sort has a _____ runtime complexity
◉ O(N)
Answer: A linear search has a _____ runtime complexity
◉ Constant
Answer: O(5) has a _____ runtime complexity
◉ Quadratic
Answer: O(N + N^2) has a _____ runtime complexity.
◉ worst-case runtime
Answer: The ______ of an algorithm is the runtime complexity for
an input that results in the longest execution.
◉ recursive algorithm
Answer: An algorithm that breaks the problem into smaller
subproblems and applies the algorithm itself to solve the smaller
subproblems