5 Written questions
5 Matching questions
- linked list
- runtime stack
- a a problem that is so hard (typically exponential) that it cannot be solved unless the problem is small.
- b a pointer to the next element in a linked list.
- c a sequence of records, where each record contains a link to the next one.
- d a stack containing a stack frame of variable values for each active invocation of a procedure.
- e a case where a program calls itself.
5 Multiple choice questions
- a queue implemented within an array, where the first element of the array logically follows the last element.
- 1. in Lisp, the function that constructs a pair of pointers, or basic element of list structure. 2. a cons data structure. 3. to make a cons data structure.
- A contiguous block of memory containing elements of the same type, accessed by numeric index.
- a number that is defined as an object, so that it has a runtime type and methods that can be used, e.g. Integer in Java.
- the area of program text over which a variable can be referenced.
5 True/False questions
class → in a tree, a node pointed to by a parent node.
random access → a simple case that can be solved easily, without recursion.
inorder → an element of a linked list, tree, or graph, often represented by a data structure.
ancestors → the next element in a linked list.
postorder → an order of processing a tree in which the parent node is processed after its children.