5 Written questions
5 Matching questions
- What are the different representations of trees that we are concerned with for Novak's class?
- What is a node with no children called?
- What is the Big O of inserting at the front of a LinkedList?
- What is a link?
- How can you find the Big O of an if statement?
- a O(1)
- b Binary trees, First-Child/Next-sibling, Linked lists, Implicit
- c a leaf
- d A directed pointer from one node to another
- e The max of the Big O of the test, then statement, and else statement
5 Multiple choice questions
- A kind of graph composed of nodes and links. It has one root node. Each node except the root has exactly one parent. All nodes are reachable from the root.
- 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)
- an order of processing a tree in which the parent node is processed in between its children
- A data structure where each element has two fields: a link and contents
5 True/False questions
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 function assoc do? → It provides a simple lookup tool to find information in a linked list. (assoc 'b '((a 1) (b 2) (c 3))) = (b 2)
What are the two fields of a cons cell called? → Something as simple as a number, or a pointer to another linked list
What is a root? → A directed pointer from one node to another
A long is how many bits? → 64 bits, or about 19 decimal digits.