Level 7 qualified to (re-)take Blue Belt exam If you are stuck, not making progress, or unsure what you should be doing, make sure to check in with me today or at office hours tomorrow.
type T, ftest, a test function T → Bool Output: an element, e, of lst such that ftest(e) is True, or None if no such element exists What is the complexity of the FindMatch problem?
type T, ftest, a test function T → Bool Output: an element, e, of lst such that ftest(e) is True, or None if no such element exists Complexity: Running time is in ϴ(N) - We know an algorithm, find_match, with running time in ϴ(N) - We know no asymptotically faster solution exists since it is necessary to look at all elements for a possible match.
type T, ftest, a test function T → Bool Output: an element, e, of lst such that ftest(e) is True, or None if no such element exists Complexity: Running time is in ϴ(N) - We know an algorithm, find_match, with running time in ϴ(N) - We know no asymptotically faster solution exists since it is necessary to look at all elements for a possible match. How can we do better?
tree, faster searching If you are stuck, not making progress, or unsure what you should be doing, make sure to check in with me today or at office hours tomorrow.