Data Structures & Algorithms
Exam Questions with Answers
The ingredients in an algorithm are called: - Correct Answers: Inputs
Instead of a list of steps, algorithms can be written using: - Correct Answers: Flowcharts with arrows to
illustrate the journey
A programming algorithm is like: - Correct Answers: A recipe
An algorithm always leads to a(n): - Correct Answers: Solution
An algorithm is written down as: - Correct Answers: A list of steps
What is one major drawback of experimental analysis? - Correct Answers: Implementation of programs
What are asymptotic notations? - Correct Answers: Notations that allow us to analyze an algorithm's
running time by identifying its behavior as the input size for the algorithm increases.
What is NOT an asymptotic notation? - Correct Answers: β
If f(n) is the function then O(f(n)) = { g(n) : there exists c > 0 and n0 such that f(n) ≤ c.g(n) for all n > n0. }
is true for which of the following symptotic notations ? - Correct Answers: Big Oh
An experimental analysis depends on the _____ results, so an algorithm cannot be measured unless an
_____ is implemented. - Correct Answers: output; equivalent program
Kara's code includes a binary search operation. Which of the following functions would be optimal to
test the execution time of this function? - Correct Answers: Log n