5 Written questions
5 Matching questions
- What does the function merge do?
- What is random access?
- What does it mean for functions to share structure?
- What is XML?
- What is a pointer (aka reference)?
- a It combines two sorted lists into one sorted list. Duplicated elements are retained.
- b describes a data structure in which all accesses have the same costs, O(1). e.g. an array.
- c Extensible Markup Language, it allows users to put tags around their data to describe what the pieces of data mean. <city> Austin </city>
- d The memory address of the beginning of a record, or block of storage
- e The same list structure is part of more than one list.
5 Multiple choice questions
- It makes a new linked list whose elements are in reverse order of the original list
- Slowly. log(1000) = 10, log(1,000,000) = 20, log(1,000,000,000) = 30.
- an order of processing a tree in which the parent node is processed in between its children
- car and cdr (original names), or first and rest.
- 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.
5 True/False questions
What does the function Intersection do? → It returns a set of elements that are members of both sets. (intersection '(i c e) '(c r e a m)) = (e c)
When the ratio of times as the size of input is doubled is about 8, what is the Big O? → O(n²)
What is well-founded ordering? → ordering that can guarantee to terminate (go down to zero)
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 node with no children called? → a leaf