

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


A programming algorithm is like: - A recipe An algorithm always leads to a(n): - Solution An algorithm is written down as: - A list of steps An algorithm tests the air pressure on a slope at different altitudes. Given that the pressure depends on the altitude, what is the optimal algorithmic function to use? - Linear An experimental analysis depends on the _____ results, so an algorithm cannot be measured unless an _____ is implemented. - output; equivalent program Brian has an algorithm to read through an array that contains numbers 1 through 26 and convert each number to an English alphabet. He runs the algorithm a number of times with no changes to the size of the array and no changes to the task done. The function to use is: _____ - f(n) = c Contrapositive and contradiction fall under which category of algorithm analysis? - Contra Attack For a linear function, what would be its time complexity? - O(N)
If an algorithm runs in quadratic time, what is its time complexity using Big-O ? - O(N2) 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? - Big Oh If one for loop runs with size N and the other with size M and the loops follow a linear function, what is the expected time complexity? - O(M+N) In a linear function, the time taken is _____ if the size of the input is doubled.