5 Written questions
5 Matching questions
- What is a doubly linked list?
- For reference types, what do == and != test?
- Which function will produce a linear plot on semi-log paper?
- What does the function merge do?
- O(log(n)) is better than which function?
- a It has pointers that point both forward and backward
- b It combines two sorted lists into one sorted list. Duplicated elements are retained.
- c O(N). Much, much better.
- d The equality of pointer values (i.e. do they have the exact same data address in memory?)
- e Exponential
5 Multiple choice questions
- add and remove are O(N) for random positions, contains is O(N)
- O( n*log(n) )
- Simple inputs for which the answer is obvious and can be determined immediately.
- A linked list links new elements onto the front of the list.
5 True/False questions
What does the function assoc do? → It combines two sorted lists into one sorted list. Duplicated elements are retained.
In a Cons list, first and rest have different types. What are they? → The max of the Big O of the test, then statement, and else statement
What does depth-first search 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
10 bits is equal to about how many decimal digits? → 9
An int is how many bits? → 32