CS212
Exams
Spring
1999 -
Final
True and False
TRUE or FALSE:
- It is possible to write a program that determines whether an arbitrary
Scheme program halts.
- It is possible to write a program that determines whether the Scheme
program ((lambda (x) (x x)) (lambda (x) (x x))) halts.
- It is possible to encode recursive functions in Scheme without using
macros, letrec, define, or side-effects.
- It is possible to sort a list of length n, in time O(n2).
- The heap-based implementation of priority queues given in class had the
property that inserting and removing elements took at most constant time.
- An algorithm that runs in time O(n log n) is always faster
than an algorithm that runs in time O(n2).
Solution
Return to CS 212 Final - Spring 1999