5 Written questions
5 Matching questions
- What does a sentinel node hold or reference?
- What is a binary tree?
- How many links does a node that isn't the root have coming into it?
- What are the two fields of a cons cell called?
- What is well-founded ordering?
- a car and cdr (original names), or first and rest.
- b A tree in which each node has at most two children
- c Exactly one
- d nothing; a sentinel is an extra node, usually at the front or end, that simplifies coding.
- e ordering that can guarantee to terminate (go down to zero)
5 Multiple choice questions
- Integer myInteger = Integer.valueOf(myInt);
Integer myInteger = myInt; // autoboxing
- getFirst, addFirst, removeFirst, getLast, addLast, removeLast are all O(1)
- add and remove are O(N) for random positions, contains is O(N)
- Simple inputs for which the answer is obvious and can be determined immediately.
5 True/False questions
What is a Cons? → A pointer to the next element
What does the function nconc do? → It returns the set of elements that are members of either set (basically all elements with no duplicates).
(union '(i c e) '(c r e a m)) = (i c r e a m)
What is the term for items being inserted at the end of a queue? → dequeued
Since log(n) grows at the rate it does, what number can it be compared to? → 1
What is the best way to remember how to draw a FC/NS Tree? → O(log(N))