5 Written Questions
5 Matching Questions
- In a Cons list, first and rest have different types. What are they?
- What is a doubly linked list?
- What does the following produce?
(rest (rest '((a b) c)))
- How many links does a node that isn't the root have coming into it?
- What is the Big O of inserting at the front of an array or an ArrayList?
- a O(N)
- b First can be any Object type, while rest is a Cons or null
- c Exactly one
- d null
- e It has pointers that point both forward and backward
5 Multiple Choice Questions
- It makes a new linked list whose elements are in reverse order of the original list
- get, set, and remove are O(N)
- A queue
5 True/False Questions
O(log(n)) is better than which function? → O(N)
For reference types, what do == and != test? → The equality of pointer values (i.e. do they have the exact same data address in memory?)
What is a root? → The uppermost node that has no incoming links
What is a fair data structure? → An entry in a queue will eventually get serviced and removed so a queue is fair
What is a constructive function? → a stack that keeps a fresh set of values for each variable in a stack frame