5 Written questions
5 Matching questions
- What is a reference?
- What does the function Union do?
- What does the function Intersection do?
- How does the constructing of a linked list work?
- What does the function append() do to a linked list?
- a A pointer to data
- b It concatenates two lists to form a single list.
(append '(a b c) '(d e)) = (a b c d e)
- c A linked list links new elements onto the front of the list.
- d 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)
- e It returns a set of elements that are members of both sets. (intersection '(i c e) '(c r e a m)) = (e c)
5 Multiple choice questions
- Integer in Java, a record that has a class, has methods, can be pointed to and used in other structures.
- It reverses a list in place by turning the pointers around.
5 True/False questions
With respect to linked lists, what does .set(idx, element) do? → The number of "things" in the linked list
An int is how many bits? → A directed pointer from one node to another
What is a fair data structure? → In a tree, it is a node that points to a given node
What does the function reverse() do to a linked list? → It returns a set of elements that are members of both sets. (intersection '(i c e) '(c r e a m)) = (e c)
What does a recursive program do? → It concatenates two lists to form a single list; it does so by modifying the end of the first list to point to the second list