5 Written questions
5 Matching questions
- When the ratio of times as the size of input is doubled is about 4, what is the Big O?
- What is a First-Child / Next-Sibling Tree?
- What is the Big O of accessing some element in the middle of a LinkedList?
- What is the Big O of a matrix multiply?
- What will a filter function do?
- a Down arrows represent the first child, while side arrows represent the next sibling
- b O(n³)
- c Filter removes items from a Collection if they meet a certain condition
- d O(n²)
- e O(N)
5 Multiple choice questions
- Integer myInteger = Integer.valueOf(myInt);
Integer myInteger = myInt; // autoboxing
- It makes a new linked list whose elements are in reverse order of the original list
- nothing; a sentinel is an extra node, usually at the front or end, that simplifies coding.
- it can be data that is incorrect, meaningless, or random, or storage that is no longer pointed to
5 True/False questions
What does depth-first search do? → It searches children of a node before siblings are considered (through recursion)
What is a pointer (aka reference)? → The memory address of the beginning of a record, or block of storage
With respect to linked lists, what does .set(idx, element) do? → The equality of pointer values (i.e. do they have the exact same data address in memory?)
What is the Big O of inserting at the front of a LinkedList? → O(N)
What is sometimes called a boxed integer? → The last link points back to the front of the list rather than to null or nil