5 Written questions
5 Matching questions
- What does the function Intersection do?
- When the ratio of times as the size of input is doubled is about 2, what is the Big O?
- What does the function reverse() do to a linked list?
- What is a node with no children called?
- With respect to linked lists, what does .set(idx, element) do?
- a Replaces the element at the specified position in this list with the specified element.
- b a leaf
- c It makes a new linked list whose elements are in reverse order of the original list
- d It returns a set of elements that are members of both sets. (intersection '(i c e) '(c r e a m)) = (e c)
- e O(n)
5 Multiple choice questions
- (c a)
- A pointer to the next element
- A function that creates a new list, but does not modify the original list's arguments
- The same list structure is part of more than one list.
- The last link points back to the front of the list rather than to null or nil
5 True/False questions
When there is a straight line on a log-log graph, what does the slope represent? → Replaces the element at the specified position in this list with the specified element.
What is an association list? → The function that constructs a pair containing two pointers
How many links does a node that isn't the root have coming into it? → Any number
What does it mean to divide and conquer? → To break down a large problem into two smaller problems, until the problem becomes easy
What does the following linked list produce?
(cons 'a '(b c)) → null