5 Written questions
5 Matching questions
- What is a root?
- When there is a straight line on a log-log graph, what does the slope represent?
- 64-bits can represent about how many decimal digits?
- What is a linked list?
- What is a Cons?
- a 19
- b The exponent of the polynomial, e.g. slope of 2 is O(n²).
- c The uppermost tree node that has no incoming links
- d The function that constructs a pair containing two pointers
- e A data structure where each element has two fields: a link and contents
5 Multiple choice questions
- a way of processing a tree where the parent node is processed before the children
- It makes a new list element containing item, and adds it to the front of list
- nothing; a sentinel is an extra node, usually at the front or end, that simplifies coding.
- It concatenates two lists to form a single list.
(append '(a b c) '(d e)) = (a b c d e)
5 True/False questions
What is a circularly linked list? → It has pointers that point both forward and backward
What is design pattern? → a pattern that describes a set of similar programs
What does the function member do? → It tests whether a given item is an element of a list. It returns the remainder of the list beginning with the desired element
When the ratio of times as the size of input is doubled is about 2, what is the Big O? → O(n)
What are the disadvantages of ArrayList? → get and set are O(1), and add and remove at the end are O(1) so it makes a good stack