5 Written questions
5 Matching questions
- How does the constructing of a linked list work?
- What is a fair data structure?
- What should be used to test the equality of the contents or value of a reference type?
- What does it mean to divide and conquer?
- What does it mean for something to be random access?
- a To break down a large problem into two smaller problems, until the problem becomes easy
- b .equals()
- c A linked list links new elements onto the front of the list.
- d Access to any element has the same cost, O(1); (for example, arrays)
- e An entry in a queue will eventually get serviced and removed so a queue is fair
5 Multiple choice questions
- Integer in Java, a record that has a class, has methods, can be pointed to and used in other structures.
- O(N). Much, much better.
- The loop count times the Big O of the contents
- add and remove are O(N) for random positions, contains is O(N)
5 True/False questions
What is the term for items being removed from the front of a queue? → dequeued
What is the Big O of inserting at the front of an array or an ArrayList? → dequeued
What is a root? → The uppermost tree node that has no incoming links
What does depth-first search do? → It searches children of a node before siblings are considered (through recursion)
What is the Big O of a matrix multiply? → O(n³)