5 Written questions
5 Matching questions
- How can you find the Big O of a loop?
- With respect to linked lists, what does .set(idx, element) do?
- What is a Cons?
- What is sometimes called a boxed integer?
- What is design pattern?
- a The function that constructs a pair containing two pointers
- b The loop count times the Big O of the contents
- c a pattern that describes a set of similar programs
- d Replaces the element at the specified position in this list with the specified element.
- e Integer in Java, a record that has a class, has methods, can be pointed to and used in other structures.
5 Multiple choice questions
- A function that creates a new list, but does not modify the original list's arguments
- a leaf
- (c a)
- To break down a large problem into two smaller problems, until the problem becomes easy
- It has pointers that point both forward and backward
5 True/False questions
What does the function reverse() do to a linked list? → It makes a new linked list whose elements are in reverse order of the original list
What is the output:
(member 'dick '(tom dick harry)) → (c a)
What is well-founded ordering? → ordering that can guarantee to terminate (go down to zero)
What is a binary tree? → A tree in which each node has at most two children
What is a destructive function? → A function that creates a new list, but does not modify the original list's arguments